Image decoding method, and device for same

ABSTRACT

An image decoding method performed by a decoding device according to the present document is characterized by comprising the steps of: acquiring image information through a bitstream; and decoding the current picture on the basis of the image information. The step for acquiring the image information includes the steps of: acquiring a flag indicating whether a picture header (PH) network abstraction layer (NAL) unit for the current picture is present; and acquiring the PH for the current picture on the basis of the flag, wherein the NAL unit including the PH is derived on the basis of the flag.

CROSS-REFERENCE TO RELATED APPLICATIONS

Pursuant to 35 U.S.C. § 119(e), this application is a continuation ofInternational Application PCT/KR2020/019325, with an internationalfiling date of Dec. 29, 2020, which claims the benefit of U.S.Provisional Patent Application No. 62/956,626, filed on Jan. 2, 2020,the contents of which are hereby incorporated by reference herein intheir entirety.

BACKGROUND OF THE DISCLOSURE Field of the Disclosure

The present disclosure relates to image coding technology, and morespecifically, to a video decoding method and apparatus for adaptivelycoding a PH NAL unit in an image coding system.

Related Art

Recently, demand for high-resolution, high-quality images, such as HighDefinition (HD) images and Ultra High Definition (UHD) images, has beenincreasing in various fields. As the image data has high resolution andhigh quality, the amount of information or bits to be transmittedincreases relative to the legacy image data. Therefore, when image datais transmitted using a medium such as a conventional wired/wirelessbroadband line or image data is stored using an existing storage medium,the transmission cost and the storage cost thereof are increased.

Accordingly, there is a need for a highly efficient image compressiontechnique for effectively transmitting, storing, and reproducinginformation of high-resolution and high-quality images.

SUMMARY

A technical object of the present disclosure is to provide a method andapparatus for improving image coding efficiency.

Another technical object of the present disclosure is to provide amethod and an apparatus for coding a flag indicating presence or absenceof a PH NAL unit.

According to an embodiment of the present disclosure, an image decodingmethod performed by a decoding apparatus is provided. The methodincludes obtaining image information from a bitstream and decoding acurrent picture based on the image information, wherein the obtainingthe image information includes: obtaining a flag for whether a PictureHeader (PH) Network Abstraction Layer (NAL) unit for the current pictureis present, and obtaining a PH for the current picture based on theflag, and wherein a NAL unit including the PH is derived based on theflag.

According to another embodiment of the present disclosure, a decodingapparatus performing image decoding is provided. The decoding apparatusincludes an entropy decoder configured to obtain image information froma bitstream, and a predictor configured to decode a current picturebased on the image information, wherein the entropy decoder obtains aflag for whether a Picture Header (PH) Network Abstraction Layer (NAL)unit for the current picture is present, and obtains a PH for thecurrent picture based on the flag, and wherein a NAL unit including thePH is derived based on the flag.

According to another embodiment of the present disclosure, a videoencoding method performed by an encoding apparatus is provided. Themethod includes generating a Picture Header (PH) for a current picture,and encoding image information including the PH, wherein the encodingthe image information includes: determining whether a Picture Header(PH) Network Abstraction Layer (NAL) unit including is present, derivinga NAL unit including the PH based on a result of the determination, andencoding the NAL unit and a flag for whether the PH NAL unit is present.

According to another embodiment of the present disclosure, a videoencoding apparatus is provided. The encoding apparatus includes anentropy encoder configured to generate a Picture Header (PH) for acurrent picture, and encode image information including the PH, whereinthe entropy encoder determines whether a Picture Header (PH) NetworkAbstraction Layer (NAL) unit including is present, derives a NAL unitincluding the PH based on a result of the determination, and encodes theNAL unit and a flag for whether the PH NAL unit is present.

According to another embodiment of the present disclosure, acomputer-readable digital storage medium storing a bitstream includingimage information and causing an image decoding method to be executed isprovided. In the computer-readable digital storage medium, the imagedecoding method includes obtaining image information from a bitstreamand decoding a current picture based on the image information, whereinthe obtaining the image information includes: obtaining a flag forwhether a Picture Header (PH) Network Abstraction Layer (NAL) unit forthe current picture is present, and obtaining a PH for the currentpicture based on the flag, and wherein a NAL unit including the PH isderived based on the flag.

According to the present disclosure, it is possible to signal a flagindicating presence or absence of a PH NAL unit, control a NAL unitadaptively to a bit rate of a bitstream based on the flag and improveoverall coding efficiency.

According to the present disclosure, it is possible to set constraintson the number of slices in a current picture and constraints on presenceof a PH NAL unit for related pictures based on a flag indicatingpresence or absence of a PH NAL unit to control a NAL unit adaptively toa bit rate of a bitstream, improving overall coding efficiency.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 briefly illustrates an example of a video/image coding device towhich embodiments of the present disclosure are applicable.

FIG. 2 is a schematic diagram illustrating a configuration of avideo/image encoding apparatus to which the embodiment(s) of the presentdisclosure may be applied.

FIG. 3 is a schematic diagram illustrating a configuration of avideo/image decoding apparatus to which the embodiment(s) of the presentdisclosure may be applied.

FIG. 4 illustrates an example of an intra prediction-based video/imageencoding method.

FIG. 5 illustrates an example of an intra prediction-based video/imagedecoding method.

FIG. 6 schematically shows an intra prediction procedure.

FIG. 7 illustrates an example of an inter prediction-based video/imageencoding method.

FIG. 8 illustrates an example of an inter prediction-based video/imagedecoding method.

FIG. 9 schematically shows an inter prediction procedure.

FIG. 10 schematically shows a hierarchical structure of coded imageinformation.

FIG. 11 schematically shows an encoding procedure according to anembodiment of the present disclosure.

FIG. 12 schematically shows a decoding procedure according to anembodiment of the present disclosure.

FIG. 13 schematically shows a picture header configuration in a NAL unitaccording to presence or absence of a PH NAL unit.

FIG. 14 schematically shows an image encoding method by an encodingapparatus according to the present document.

FIG. 15 schematically shows an encoding apparatus for performing animage encoding method according to this document.

FIG. 16 schematically shows an image decoding method by a decodingapparatus according to this document.

FIG. 17 schematically shows a decoding apparatus for performing an imagedecoding method according to this document.

FIG. 18 illustrates a structural diagram of a contents streaming systemto which the present disclosure is applied.

DESCRIPTION OF EMBODIMENTS

The present disclosure may be modified in various forms, and specificembodiments thereof will be described and illustrated in the drawings.However, the embodiments are not intended for limiting the disclosure.The terms used in the following description are used to merely describespecific embodiments but are not intended to limit the disclosure. Anexpression of a singular number includes an expression of the pluralnumber, so long as it is clearly read differently. The terms such as“include” and “have” are intended to indicate that features, numbers,steps, operations, elements, components, or combinations thereof used inthe following description exist and it should be thus understood thatthe possibility of existence or addition of one or more differentfeatures, numbers, steps, operations, elements, components, orcombinations thereof is not excluded.

Meanwhile, elements in the drawings described in the disclosure areindependently drawn for the purpose of convenience for explanation ofdifferent specific functions, and do not mean that the elements areembodied by independent hardware or independent software. For example,two or more elements of the elements may be combined to form a singleelement, or one element may be partitioned into plural elements. Theembodiments in which the elements are combined and/or partitioned belongto the disclosure without departing from the concept of the disclosure.

Hereinafter, embodiments of the present disclosure will be described indetail with reference to the accompanying drawings. In addition, likereference numerals are used to indicate like elements throughout thedrawings, and the same descriptions on the like elements will beomitted.

FIG. 1 briefly illustrates an example of a video/image coding device towhich embodiments of the present disclosure are applicable.

Referring to FIG. 1 , a video/image coding system may include a firstdevice (source device) and a second device (receiving device). Thesource device may deliver encoded video/image information or data in theform of a file or streaming to the receiving device via a digitalstorage medium or network.

The source device may include a video source, an encoding apparatus, anda transmitter. The receiving device may include a receiver, a decodingapparatus, and a renderer. The encoding apparatus may be called avideo/image encoding apparatus, and the decoding apparatus may be calleda video/image decoding apparatus. The transmitter may be included in theencoding apparatus. The receiver may be included in the decodingapparatus. The renderer may include a display, and the display may beconfigured as a separate device or an external component.

The video source may acquire video/image through a process of capturing,synthesizing, or generating the video/image. The video source mayinclude a video/image capture device and/or a video/image generatingdevice. The video/image capture device may include, for example, one ormore cameras, video/image archives including previously capturedvideo/images, and the like. The video/image generating device mayinclude, for example, computers, tablets and smartphones, and may(electronically) generate video/images. For example, a virtualvideo/image may be generated through a computer or the like. In thiscase, the video/image capturing process may be replaced by a process ofgenerating related data.

The encoding apparatus may encode input image/image. The encodingapparatus may perform a series of procedures such as prediction,transform, and quantization for compression and coding efficiency. Theencoded data (encoded video/image information) may be output in the formof a bitstream.

The transmitter may transmit the encoded image/image information or dataoutput in the form of a bitstream to the receiver of the receivingdevice through a digital storage medium or a network in the form of afile or streaming. The digital storage medium may include variousstorage mediums such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, and thelike. The transmitter may include an element for generating a media filethrough a predetermined file format and may include an element fortransmission through a broadcast/communication network. The receiver mayreceive/extract the bitstream and transmit the received bitstream to thedecoding apparatus.

The decoding apparatus may decode the video/image by performing a seriesof procedures such as dequantization, inverse transform, and predictioncorresponding to the operation of the encoding apparatus.

The renderer may render the decoded video/image. The renderedvideo/image may be displayed through the display.

Present disclosure relates to video/image coding. For example, themethods/embodiments disclosed in the present disclosure may be appliedto a method disclosed in the versatile video coding (VVC), the EVC(essential video coding) standard, the AOMedia Video 1 (AV1) standard,the 2nd generation of audio video coding standard (AVS2), or the nextgeneration video/image coding standard (ex. H.267 or H.268, etc.).

Present disclosure presents various embodiments of video/image coding,and the embodiments may be performed in combination with each otherunless otherwise mentioned.

In the present disclosure, video may refer to a series of images overtime. Picture generally refers to a unit representing one image in aspecific time zone, and a subpicture/slice/tile is a unit constitutingpart of a picture in coding. The subpicture/slice/tile may include oneor more coding tree units (CTUs). One picture may consist of one or moresubpictures/slices/tiles. One picture may consist of one or more tilegroups. One tile group may include one or more tiles. A brick mayrepresent a rectangular region of CTU rows within a tile in a picture. Atile may be partitioned into multiple bricks, each of which consistingof one or more CTU rows within the tile. A tile that is not partitionedinto multiple bricks may be also referred to as a brick. A brick scan isa specific sequential ordering of CTUs partitioning a picture in whichthe CTUs are ordered consecutively in CTU raster scan in a brick, brickswithin a tile are ordered consecutively in a raster scan of the bricksof the tile, and tiles in a picture are ordered consecutively in araster scan of the tiles of the picture. In addition, a subpicture mayrepresent a rectangular region of one or more slices within a picture.That is, a subpicture contains one or more slices that collectivelycover a rectangular region of a picture. A tile is a rectangular regionof CTUs within a particular tile column and a particular tile row in apicture. The tile column is a rectangular region of CTUs having a heightequal to the height of the picture and a width specified by syntaxelements in the picture parameter set. The tile row is a rectangularregion of CTUs having a height specified by syntax elements in thepicture parameter set and a width equal to the width of the picture. Atile scan is a specific sequential ordering of CTUs partitioning apicture in which the CTUs are ordered consecutively in CTU raster scanin a tile whereas tiles in a picture are ordered consecutively in araster scan of the tiles of the picture. A slice includes an integernumber of bricks of a picture that may be exclusively contained in asingle NAL unit. A slice may consist of either a number of completetiles or only a consecutive sequence of complete bricks of one tile.Tile groups and slices may be used interchangeably in the presentdisclosure. For example, in the present disclosure, a tile group/tilegroup header may be called a slice/slice header.

A pixel or a pel may mean a smallest unit constituting one picture (orimage). Also, ‘sample’ may be used as a term corresponding to a pixel. Asample may generally represent a pixel or a value of a pixel, and mayrepresent only a pixel/pixel value of a luma component or only apixel/pixel value of a chroma component.

A unit may represent a basic unit of image processing. The unit mayinclude at least one of a specific region of the picture and informationrelated to the region. One unit may include one luma block and twochroma (ex. cb, cr) blocks. The unit may be used interchangeably withterms such as block or area in some cases. In a general case, an M×Nblock may include samples (or sample arrays) or a set (or array) oftransform coefficients of M columns and N rows.

In the present description, “A or B” may mean “only A”, “only B” or“both A and B”. In other words, in the present specification, “A or B”may be interpreted as “A and/or B”. For example, “A, B or C” hereinmeans “only A”, “only B”, “only C”, or “any and any combination of A, Band C”.

A slash (/) or a comma (comma) used in the present description may mean“and/or”. For example, “A/B” may mean “A and/or B”. Accordingly, “A/B”may mean “only A”, “only B”, or “both A and B”. For example, “A, B, C”may mean “A, B, or C”.

In the present description, “at least one of A and B” may mean “only A”,“only B”, or “both A and B”. In addition, in the present description,the expression “at least one of A or B” or “at least one of A and/or B”may be interpreted the same as “at least one of A and B”.

In addition, in the present description, “at least one of A, B and C”means “only A”, “only B”, “only C”, or “any combination of A, B and C”.Also, “at least one of A, B or C” or “at least one of A, B and/or C” maymean “at least one of A, B and C”.

In addition, parentheses used in the present description may mean “forexample”. Specifically, when “prediction (intra prediction)” isindicated, “intra prediction” may be proposed as an example of“prediction”. In other words, “prediction” in the present description isnot limited to “intra prediction”, and “intra prediction” may beproposed as an example of “prediction”. Also, even when “prediction (ie,intra prediction)” is indicated, “intra prediction” may be proposed asan example of “prediction”.

In the present description, technical features that are individuallydescribed within one drawing may be implemented individually or may beimplemented at the same time.

The following drawings were created to explain a specific example of thepresent description. Since the names of specific devices described inthe drawings or the names of specific signals/messages/fields arepresented by way of example, the technical features of the presentdescription are not limited to the specific names used in the followingdrawings.

FIG. 2 is a schematic diagram illustrating a configuration of avideo/image encoding apparatus to which the embodiment(s) of the presentdisclosure may be applied. Hereinafter, the video encoding apparatus mayinclude an image encoding apparatus.

Referring to FIG. 2 , the encoding apparatus 200 includes an imagepartitioner 210, a predictor 220, a residual processor 230, and anentropy encoder 240, an adder 250, a filter 260, and a memory 270. Thepredictor 220 may include an inter predictor 221 and an intra predictor222. The residual processor 230 may include a transformer 232, aquantizer 233, a dequantizer 234, and an inverse transformer 235. Theresidual processor 230 may further include a subtractor 231. The adder250 may be called a reconstructor or a reconstructed block generator.The image partitioner 210, the predictor 220, the residual processor230, the entropy encoder 240, the adder 250, and the filter 260 may beconfigured by at least one hardware component (ex. An encoder chipset orprocessor) according to an embodiment. In addition, the memory 270 mayinclude a decoded picture buffer (DPB) or may be configured by a digitalstorage medium. The hardware component may further include the memory270 as an internal/external component.

The image partitioner 210 may partition an input image (or a picture ora frame) input to the encoding apparatus 200 into one or moreprocessors. For example, the processor may be called a coding unit (CU).In this case, the coding unit may be recursively partitioned accordingto a quad-tree binary-tree ternary-tree (QTBTTT) structure from a codingtree unit (CTU) or a largest coding unit (LCU). For example, one codingunit may be partitioned into a plurality of coding units of a deeperdepth based on a quad tree structure, a binary tree structure, and/or aternary structure. In this case, for example, the quad tree structuremay be applied first and the binary tree structure and/or ternarystructure may be applied later. Alternatively, the binary tree structuremay be applied first. The coding procedure according to the presentdisclosure may be performed based on the final coding unit that is nolonger partitioned. In this case, the largest coding unit may be used asthe final coding unit based on coding efficiency according to imagecharacteristics, or if necessary, the coding unit may be recursivelypartitioned into coding units of deeper depth and a coding unit havingan optimal size may be used as the final coding unit. Here, the codingprocedure may include a procedure of prediction, transform, andreconstruction, which will be described later. As another example, theprocessor may further include a prediction unit (PU) or a transform unit(TU). In this case, the prediction unit and the transform unit may besplit or partitioned from the aforementioned final coding unit. Theprediction unit may be a unit of sample prediction, and the transformunit may be a unit for deriving a transform coefficient and/or a unitfor deriving a residual signal from the transform coefficient.

The unit may be used interchangeably with terms such as block or area insome cases. In a general case, an M×N block may represent a set ofsamples or transform coefficients composed of M columns and N rows. Asample may generally represent a pixel or a value of a pixel, mayrepresent only a pixel/pixel value of a luma component or represent onlya pixel/pixel value of a chroma component. A sample may be used as aterm corresponding to one picture (or image) for a pixel or a pel.

In the encoding apparatus 200, a prediction signal (predicted block,prediction sample array) output from the inter predictor 221 or theintra predictor 222 is subtracted from an input image signal (originalblock, original sample array) to generate a residual signal residualblock, residual sample array), and the generated residual signal istransmitted to the transformer 232.

In this case, as shown, a unit for subtracting a prediction signal(predicted block, prediction sample array) from the input image signal(original block, original sample array) in the encoder 200 may be calleda subtractor 231. The predictor may perform prediction on a block to beprocessed (hereinafter, referred to as a current block) and generate apredicted block including prediction samples for the current block. Thepredictor may determine whether intra prediction or inter prediction isapplied on a current block or CU basis. As described later in thedescription of each prediction mode, the predictor may generate variousinformation related to prediction, such as prediction mode information,and transmit the generated information to the entropy encoder 240. Theinformation on the prediction may be encoded in the entropy encoder 240and output in the form of a bitstream.

The intra predictor 222 may predict the current block by referring tothe samples in the current picture. The referred samples may be locatedin the neighborhood of the current block or may be located apartaccording to the prediction mode. In the intra prediction, predictionmodes may include a plurality of non-directional modes and a pluralityof directional modes. The non-directional mode may include, for example,a DC mode and a planar mode. The directional mode may include, forexample, 33 directional prediction modes or 65 directional predictionmodes according to the degree of detail of the prediction direction.However, this is merely an example, more or less directional predictionmodes may be used depending on a setting. The intra predictor 222 maydetermine the prediction mode applied to the current block by using aprediction mode applied to a neighboring block.

The inter predictor 221 may derive a predicted block for the currentblock based on a reference block (reference sample array) specified by amotion vector on a reference picture. Here, in order to reduce theamount of motion information transmitted in the inter prediction mode,the motion information may be predicted in units of blocks, sub-blocks,or samples based on correlation of motion information between theneighboring block and the current block. The motion information mayinclude a motion vector and a reference picture index. The motioninformation may further include inter prediction direction (L0prediction, L1 prediction, Bi prediction, etc.) information. In the caseof inter prediction, the neighboring block may include a spatialneighboring block present in the current picture and a temporalneighboring block present in the reference picture. The referencepicture including the reference block and the reference pictureincluding the temporal neighboring block may be the same or different.The temporal neighboring block may be called a collocated referenceblock, a co-located CU (colCU), and the like, and the reference pictureincluding the temporal neighboring block may be called a collocatedpicture (colPic). For example, the inter predictor 221 may configure amotion information candidate list based on neighboring blocks andgenerate information indicating which candidate is used to derive amotion vector and/or a reference picture index of the current block.Inter prediction may be performed based on various prediction modes. Forexample, in the case of a skip mode and a merge mode, the interpredictor 221 may use motion information of the neighboring block asmotion information of the current block. In the skip mode, unlike themerge mode, the residual signal may not be transmitted. In the case ofthe motion vector prediction (MVP) mode, the motion vector of theneighboring block may be used as a motion vector predictor and themotion vector of the current block may be indicated by signaling amotion vector difference.

The predictor 220 may generate a prediction signal based on variousprediction methods described below. For example, the predictor may notonly apply intra prediction or inter prediction to predict one block butalso simultaneously apply both intra prediction and inter prediction.This may be called combined inter and intra prediction (CIIP). Inaddition, the predictor may be based on an intra block copy (IBC)prediction mode or a palette mode for prediction of a block. The IBCprediction mode or palette mode may be used for content image/videocoding of a game or the like, for example, screen content coding (SCC).The IBC basically performs prediction in the current picture but may beperformed similarly to inter prediction in that a reference block isderived in the current picture. That is, the IBC may use at least one ofthe inter prediction techniques described in the present disclosure. Thepalette mode may be considered as an example of intra coding or intraprediction. When the palette mode is applied, a sample value within apicture may be signaled based on information on the palette table andthe palette index.

The prediction signal generated by the predictor (including the interpredictor 221 and/or the intra predictor 222) may be used to generate areconstructed signal or to generate a residual signal. The transformer232 may generate transform coefficients by applying a transformtechnique to the residual signal. For example, the transform techniquemay include at least one of a discrete cosine transform (DCT), adiscrete sine transform (DST), a karhunen-loève transform (KLT), agraph-based transform (GBT), or a conditionally non-linear transform(CNT). Here, the GBT means transform obtained from a graph whenrelationship information between pixels is represented by the graph. TheCNT refers to transform generated based on a prediction signal generatedusing all previously reconstructed pixels. In addition, the transformprocess may be applied to square pixel blocks having the same size ormay be applied to blocks having a variable size rather than square.

The quantizer 233 may quantize the transform coefficients and transmitthem to the entropy encoder 240 and the entropy encoder 240 may encodethe quantized signal (information on the quantized transformcoefficients) and output a bitstream. The information on the quantizedtransform coefficients may be referred to as residual information. Thequantizer 233 may rearrange block type quantized transform coefficientsinto a one-dimensional vector form based on a coefficient scanning orderand generate information on the quantized transform coefficients basedon the quantized transform coefficients in the one-dimensional vectorform. Information on transform coefficients may be generated. Theentropy encoder 240 may perform various encoding methods such as, forexample, exponential Golomb, context-adaptive variable length coding(CAVLC), context-adaptive binary arithmetic coding (CABAC), and thelike. The entropy encoder 240 may encode information necessary forvideo/image reconstruction other than quantized transform coefficients(ex. values of syntax elements, etc.) together or separately. Encodedinformation (ex. encoded video/image information) may be transmitted orstored in units of NALs (network abstraction layer) in the form of abitstream. The video/image information may further include informationon various parameter sets such as an adaptation parameter set (APS), apicture parameter set (PPS), a sequence parameter set (SPS), or a videoparameter set (VPS). In addition, the video/image information mayfurther include general constraint information. In the presentdisclosure, information and/or syntax elements transmitted/signaled fromthe encoding apparatus to the decoding apparatus may be included invideo/picture information. The video/image information may be encodedthrough the above-described encoding procedure and included in thebitstream. The bitstream may be transmitted over a network or may bestored in a digital storage medium. The network may include abroadcasting network and/or a communication network, and the digitalstorage medium may include various storage media such as USB, SD, CD,DVD, Blu-ray, HDD, SSD, and the like. A transmitter (not shown)transmitting a signal output from the entropy encoder 240 and/or astorage unit (not shown) storing the signal may be included asinternal/external element of the encoding apparatus 200, andalternatively, the transmitter may be included in the entropy encoder240.

The quantized transform coefficients output from the quantizer 233 maybe used to generate a prediction signal. For example, the residualsignal (residual block or residual samples) may be reconstructed byapplying dequantization and inverse transform to the quantized transformcoefficients through the dequantizer 234 and the inverse transformer235. The adder 250 adds the reconstructed residual signal to theprediction signal output from the inter predictor 221 or the intrapredictor 222 to generate a reconstructed signal (reconstructed picture,reconstructed block, reconstructed sample array). If there is noresidual for the block to be processed, such as a case where the skipmode is applied, the predicted block may be used as the reconstructedblock. The adder 250 may be called a reconstructor or a reconstructedblock generator. The generated reconstructed signal may be used forintra prediction of a next block to be processed in the current pictureand may be used for inter prediction of a next picture through filteringas described below.

Meanwhile, luma mapping with chroma scaling (LMCS) may be applied duringpicture encoding and/or reconstruction.

The filter 260 may improve subjective/objective image quality byapplying filtering to the reconstructed signal. For example, the filter260 may generate a modified reconstructed picture by applying variousfiltering methods to the reconstructed picture and store the modifiedreconstructed picture in the memory 270, specifically, a DPB of thememory 270. The various filtering methods may include, for example,deblocking filtering, a sample adaptive offset, an adaptive loop filter,a bilateral filter, and the like. The filter 260 may generate variousinformation related to the filtering and transmit the generatedinformation to the entropy encoder 240 as described later in thedescription of each filtering method. The information related to thefiltering may be encoded by the entropy encoder 240 and output in theform of a bitstream.

The modified reconstructed picture transmitted to the memory 270 may beused as the reference picture in the inter predictor 221. When the interprediction is applied through the encoding apparatus, predictionmismatch between the encoding apparatus 200 and the decoding apparatus300 may be avoided and encoding efficiency may be improved.

The DPB of the memory 270 DPB may store the modified reconstructedpicture for use as a reference picture in the inter predictor 221. Thememory 270 may store the motion information of the block from which themotion information in the current picture is derived (or encoded) and/orthe motion information of the blocks in the picture that have alreadybeen reconstructed. The stored motion information may be transmitted tothe inter predictor 221 and used as the motion information of thespatial neighboring block or the motion information of the temporalneighboring block. The memory 270 may store reconstructed samples ofreconstructed blocks in the current picture and may transfer thereconstructed samples to the intra predictor 222.

FIG. 3 is a schematic diagram illustrating a configuration of avideo/image decoding apparatus to which the embodiment(s) of the presentdisclosure may be applied.

Referring to FIG. 3 , the decoding apparatus 300 may include an entropydecoder 310, a residual processor 320, a predictor 330, an adder 340, afilter 350, a memory 360. The predictor 330 may include an interpredictor 331 and an intra predictor 332. The residual processor 320 mayinclude a dequantizer 321 and an inverse transformer 322. The entropydecoder 310, the residual processor 320, the predictor 330, the adder340, and the filter 350 may be configured by a hardware component (ex. Adecoder chipset or a processor) according to an embodiment. In addition,the memory 360 may include a decoded picture buffer (DPB) or may beconfigured by a digital storage medium. The hardware component mayfurther include the memory 360 as an internal/external component.

When a bitstream including video/image information is input, thedecoding apparatus 300 may reconstruct an image corresponding to aprocess in which the video/image information is processed in theencoding apparatus of FIG. 2 . For example, the decoding apparatus 300may derive units/blocks based on block partition related informationobtained from the bitstream. The decoding apparatus 300 may performdecoding using a processor applied in the encoding apparatus. Thus, theprocessor of decoding may be a coding unit, for example, and the codingunit may be partitioned according to a quad tree structure, binary treestructure and/or ternary tree structure from the coding tree unit or thelargest coding unit. One or more transform units may be derived from thecoding unit. The reconstructed image signal decoded and output throughthe decoding apparatus 300 may be reproduced through a reproducingapparatus.

The decoding apparatus 300 may receive a signal output from the encodingapparatus of FIG. 2 in the form of a bitstream, and the received signalmay be decoded through the entropy decoder 310. For example, the entropydecoder 310 may parse the bitstream to derive information (ex.video/image information) necessary for image reconstruction (or picturereconstruction). The video/image information may further includeinformation on various parameter sets such as an adaptation parameterset (APS), a picture parameter set (PPS), a sequence parameter set(SPS), or a video parameter set (VPS). In addition, the video/imageinformation may further include general constraint information. Thedecoding apparatus may further decode picture based on the informationon the parameter set and/or the general constraint information.Signaled/received information and/or syntax elements described later inthe present disclosure may be decoded may decode the decoding procedureand obtained from the bitstream. For example, the entropy decoder 310decodes the information in the bitstream based on a coding method suchas exponential Golomb coding, CAVLC, or CABAC, and output syntaxelements required for image reconstruction and quantized values oftransform coefficients for residual. More specifically, the CABACentropy decoding method may receive a bin corresponding to each syntaxelement in the bitstream, determine a context model using a decodingtarget syntax element information, decoding information of a decodingtarget block or information of a symbol/bin decoded in a previous stage,and perform an arithmetic decoding on the bin by predicting aprobability of occurrence of a bin according to the determined contextmodel, and generate a symbol corresponding to the value of each syntaxelement. In this case, the CABAC entropy decoding method may update thecontext model by using the information of the decoded symbol/bin for acontext model of a next symbol/bin after determining the context model.The information related to the prediction among the information decodedby the entropy decoder 310 may be provided to the predictor (the interpredictor 332 and the intra predictor 331), and the residual value onwhich the entropy decoding was performed in the entropy decoder 310,that is, the quantized transform coefficients and related parameterinformation, may be input to the residual processor 320. The residualprocessor 320 may derive the residual signal (the residual block, theresidual samples, the residual sample array). In addition, informationon filtering among information decoded by the entropy decoder 310 may beprovided to the filter 350. Meanwhile, a receiver (not shown) forreceiving a signal output from the encoding apparatus may be furtherconfigured as an internal/external element of the decoding apparatus300, or the receiver may be a component of the entropy decoder 310.Meanwhile, the decoding apparatus according to the present disclosuremay be referred to as a video/image/picture decoding apparatus, and thedecoding apparatus may be classified into an information decoder(video/image/picture information decoder) and a sample decoder(video/image/picture sample decoder). The information decoder mayinclude the entropy decoder 310, and the sample decoder may include atleast one of the dequantizer 321, the inverse transformer 322, the adder340, the filter 350, the memory 360, the inter predictor 332, and theintra predictor 331.

The dequantizer 321 may dequantize the quantized transform coefficientsand output the transform coefficients. The dequantizer 321 may rearrangethe quantized transform coefficients in the form of a two-dimensionalblock form. In this case, the rearrangement may be performed based onthe coefficient scanning order performed in the encoding apparatus. Thedequantizer 321 may perform dequantization on the quantized transformcoefficients by using a quantization parameter (ex. quantization stepsize information) and obtain transform coefficients.

The inverse transformer 322 inversely transforms the transformcoefficients to obtain a residual signal (residual block, residualsample array).

The predictor may perform prediction on the current block and generate apredicted block including prediction samples for the current block. Thepredictor may determine whether intra prediction or inter prediction isapplied to the current block based on the information on the predictionoutput from the entropy decoder 310 and may determine a specificintra/inter prediction mode.

The predictor 320 may generate a prediction signal based on variousprediction methods described below. For example, the predictor may notonly apply intra prediction or inter prediction to predict one block butalso simultaneously apply intra prediction and inter prediction. Thismay be called combined inter and intra prediction (CIIP). In addition,the predictor may be based on an intra block copy (IBC) prediction modeor a palette mode for prediction of a block. The IBC prediction mode orpalette mode may be used for content image/video coding of a game or thelike, for example, screen content coding (SCC). The IBC basicallyperforms prediction in the current picture but may be performedsimilarly to inter prediction in that a reference block is derived inthe current picture. That is, the IBC may use at least one of the interprediction techniques described in the present disclosure. The palettemode may be considered as an example of intra coding or intraprediction. When the palette mode is applied, a sample value within apicture may be signaled based on information on the palette table andthe palette index.

The intra predictor 331 may predict the current block by referring tothe samples in the current picture. The referred samples may be locatedin the neighborhood of the current block or may be located apartaccording to the prediction mode. In the intra prediction, predictionmodes may include a plurality of non-directional modes and a pluralityof directional modes. The intra predictor 331 may determine theprediction mode applied to the current block by using a prediction modeapplied to a neighboring block.

The inter predictor 332 may derive a predicted block for the currentblock based on a reference block (reference sample array) specified by amotion vector on a reference picture. In this case, in order to reducethe amount of motion information transmitted in the inter predictionmode, motion information may be predicted in units of blocks,sub-blocks, or samples based on correlation of motion informationbetween the neighboring block and the current block. The motioninformation may include a motion vector and a reference picture index.The motion information may further include inter prediction direction(L0 prediction, L1 prediction, Bi prediction, etc.) information. In thecase of inter prediction, the neighboring block may include a spatialneighboring block present in the current picture and a temporalneighboring block present in the reference picture. For example, theinter predictor 332 may configure a motion information candidate listbased on neighboring blocks and derive a motion vector of the currentblock and/or a reference picture index based on the received candidateselection information. Inter prediction may be performed based onvarious prediction modes, and the information on the prediction mayinclude information indicating a mode of inter prediction for thecurrent block.

The adder 340 may generate a reconstructed signal (reconstructedpicture, reconstructed block, reconstructed sample array) by adding theobtained residual signal to the prediction signal (predicted block,predicted sample array) output from the predictor (including the interpredictor 332 and/or the intra predictor 331). If there is no residualfor the block to be processed, such as when the skip mode is applied,the predicted block may be used as the reconstructed block.

The adder 340 may be called reconstructor or a reconstructed blockgenerator. The generated reconstructed signal may be used for intraprediction of a next block to be processed in the current picture, maybe output through filtering as described below, or may be used for interprediction of a next picture.

Meanwhile, luma mapping with chroma scaling (LMCS) may be applied in thepicture decoding process.

The filter 350 may improve subjective/objective image quality byapplying filtering to the reconstructed signal. For example, the filter350 may generate a modified reconstructed picture by applying variousfiltering methods to the reconstructed picture and store the modifiedreconstructed picture in the memory 360, specifically, a DPB of thememory 360. The various filtering methods may include, for example,deblocking filtering, a sample adaptive offset, an adaptive loop filter,a bilateral filter, and the like.

The (modified) reconstructed picture stored in the DPB of the memory 360may be used as a reference picture in the inter predictor 332. Thememory 360 may store the motion information of the block from which themotion information in the current picture is derived (or decoded) and/orthe motion information of the blocks in the picture that have alreadybeen reconstructed. The stored motion information may be transmitted tothe inter predictor 260 so as to be utilized as the motion informationof the spatial neighboring block or the motion information of thetemporal neighboring block. The memory 360 may store reconstructedsamples of reconstructed blocks in the current picture and transfer thereconstructed samples to the intra predictor 331.

In the present disclosure, the embodiments described in the filter 260,the inter predictor 221, and the intra predictor 222 of the encodingapparatus 200 may be the same as or respectively applied to correspondto the filter 350, the inter predictor 332, and the intra predictor 331of the decoding apparatus 300. The same may also apply to the unit 332and the intra predictor 331.

In the present disclosure, at least one of quantization/inversequantization and/or transform/inverse transform may be omitted. When thequantization/inverse quantization is omitted, the quantized transformcoefficients may be called transform coefficients. When thetransform/inverse transform is omitted, the transform coefficients maybe called coefficients or residual coefficients, or may still be calledtransform coefficients for uniformity of expression.

In the present disclosure, a quantized transform coefficient and atransform coefficient may be referred to as a transform coefficient anda scaled transform coefficient, respectively. In this case, the residualinformation may include information on transform coefficient(s), and theinformation on the transform coefficient(s) may be signaled throughresidual coding syntax. Transform coefficients may be derived based onthe residual information (or the information on the transformcoefficient(s)), and scaled transform coefficients may be derived byinverse transforming (scaling) on the transform coefficients. Residualsamples may be derived based on the inverse transforming (transforming)on the scaled transform coefficients. This may be applied/expressed inother parts of the present disclosure as well.

Meanwhile, as described above, in performing video coding, prediction isperformed to improve compression efficiency. Through this, a predictedblock including prediction samples for a current block as a block to becoded (i.e., a coding target block) may be generated. Here, thepredicted block includes prediction samples in a spatial domain (orpixel domain). The predicted block is derived in the same manner in anencoding apparatus and a decoding apparatus, and the encoding apparatusmay signal information (residual information) on residual between theoriginal block and the predicted block, rather than an original samplevalue of an original block, to the decoding apparatus, therebyincreasing image coding efficiency. The decoding apparatus may derive aresidual block including residual samples based on the residualinformation, add the residual block and the predicted block to generatereconstructed blocks including reconstructed samples, and generate areconstructed picture including the reconstructed blocks.

The residual information may be generated through a transform andquantization procedure. For example, the encoding apparatus may derive aresidual block between the original block and the predicted block,perform a transform procedure on residual samples (residual samplearray) included in the residual block to derive transform coefficients,perform a quantization procedure on the transform coefficients to derivequantized transform coefficients, and signal related residualinformation to the decoding apparatus (through a bit stream). Here, theresidual information may include value information of the quantizedtransform coefficients, location information, a transform technique, atransform kernel, a quantization parameter, and the like. The decodingapparatus may perform dequantization/inverse transform procedure basedon the residual information and derive residual samples (or residualblocks). The decoding apparatus may generate a reconstructed picturebased on the predicted block and the residual block. Also, for referencefor inter prediction of a picture afterward, the encoding apparatus mayalso dequantize/inverse-transform the quantized transform coefficientsto derive a residual block and generate a reconstructed picture basedthereon.

Intra prediction may refer to prediction that generates predictionsamples for a current block based on reference samples in a picture towhich the current block belongs (hereinafter, referred to as a currentpicture). When the intra prediction is applied to the current block,neighboring reference samples to be used for the intra prediction of thecurrent block may be derived. The neighboring reference samples of thecurrent block may include a sample adjacent to the left boundary of thecurrent block of size nW×nH and a total of 2×nH samples adjacent to thebottom-left of the current block, a sample adjacent to the top boundaryof the current block and a total of 2×nW samples adjacent to thetop-right and a sample adjacent to the top-left of the current block.Alternatively, the neighboring reference samples of the current blockmay include a plurality of columns of top neighboring samples and aplurality of rows of left neighboring samples. In addition, theneighboring reference samples of the current block may include a totalof nH samples adjacent to the right boundary of the current block ofsize nW×nH, a total of nW samples adjacent to the bottom boundary of thecurrent block and a sample adjacent to the bottom-right of the currentblock.

However, some of the neighboring reference samples of the current blockhave not yet been decoded or may not be available. In this case, thedecoder may construct neighboring reference samples to be used forprediction by substituting unavailable samples with available samples.Alternatively, neighboring reference samples to be used for predictionmay be configured through interpolation of available samples.

When the neighboring reference samples are derived, (i) a predictionsample may be derived based on the average or interpolation ofneighboring reference samples of the current block, or (ii) theprediction sample may be derived based on a reference sample existing ina specific (prediction) direction with respect to a prediction sampleamong the neighboring reference samples of the current block. The caseof (i) may be called a non-directional mode or a non-angular mode, andthe case of (ii) may be called a directional mode or an angular mode.

In addition, the prediction sample may be generated throughinterpolation of a first neighboring sample located in the predictiondirection of the intra prediction mode of the current block based on theprediction sample of the current block and a second neighboring samplelocated in a direction opposite to the prediction direction among theneighboring reference samples. The above-described case may be referredto as linear interpolation intra prediction (LIP). In addition, chromaprediction samples may be generated based on the luma samples using alinear model (LM). This case may be called an LM mode or a chromacomponent LM (CCLM) mode.

In addition, a temporary prediction sample of the current block isderived based on the filtered neighboring reference samples, and aprediction sample of the current block may also be derived by weightedsumming the temporary prediction sample and at least one referencesample derived according to the intra prediction mode among the existingneighboring reference samples, that is, unfiltered neighboring referencesamples. The above-described case may be referred to as positiondependent intra prediction (PDPC).

In addition, a reference sample line with the highest predictionaccuracy among neighboring multiple reference sample lines of thecurrent block is selected, and a prediction sample is derived using areference sample located in the prediction direction in the selectedline. In this case, intra prediction encoding may be performed byindicating (signaling) the used reference sample line to the decodingapparatus. The above-described case may be referred to asmulti-reference line intra prediction or MRL-based intra prediction.

In addition, the current block is divided into vertical or horizontalsub-partitions and intra prediction is performed based on the same intraprediction mode, but neighboring reference samples may be derived andused in units of the sub-partitions. That is, in this case, the intraprediction mode for the current block is equally applied to thesub-partitions, but the intra prediction performance may be improved insome cases by deriving and using the neighboring reference samples inunits of the sub-partitions. This prediction method may be calledintra-prediction based on intra sub-partitions (ISP).

The above-described intra prediction methods may be called intraprediction types to be distinguished from the intra prediction mode. Theintra prediction types may be referred to by various terms such as intraprediction technique or additional intra prediction modes. For example,the intra prediction types (or additional intra prediction modes, etc.)may include at least one of the aforementioned LIP, PDPC, MRL, and ISP.A general intra prediction method excluding a specific intra predictiontype such as LIP, PDPC, MRL, and ISP may be referred to as a normalintra prediction type. The normal intra prediction type may be generallyapplied when the above specific intra prediction type is not applied,and prediction may be performed based on the above-described intraprediction mode. Meanwhile, if necessary, post-processing filtering maybe performed on the derived prediction sample.

Specifically, the intra prediction process may include an intraprediction mode/type determination step, neighboring reference samplesderivation step, and an intra prediction mode/type based predictionsample derivation step. In addition, if necessary, a post-filtering stepmay be performed on the derived prediction sample.

FIG. 4 illustrates an example of an intra prediction-based video/imageencoding method.

Referring to FIG. 4 , the encoding device performs intra prediction onthe current block S400. The encoding device derives an intra predictionmode/type for the current block, derives neighboring reference samplesof the current block, generates prediction samples in the current blockbased on the intra prediction mode/type and the neighboring referencesamples. Here, the intra prediction mode/type determination, neighboringreference samples derivation, and prediction samples generationprocedures may be performed simultaneously, or one procedure may beperformed before another procedure. The encoding device may determine amode/type applied to the current block from among a plurality of intraprediction modes/types. The encoding device may compare RD costs for theintra prediction mode/types and determine an optimal intra predictionmode/type for the current block.

Meanwhile, the encoding device may perform a prediction sample filteringprocedure. The prediction sample filtering may be referred to as postfiltering. Some or all of the prediction samples may be filtered by theprediction sample filtering procedure. In some cases, the predictionsample filtering procedure may be omitted.

The encoding device generates residual samples for the current blockbased on the (filtered) prediction samples S410. The encoding device maycompare the prediction samples in the original samples of the currentblock based on the phase and derive the residual samples.

The encoding device may encode image information including informationon the intra prediction (prediction information) and residualinformation on the residual samples S420. The prediction information mayinclude the intra prediction mode information and the intra predictiontype information. The encoding device may output encoded imageinformation in the form of a bitstream. The output bitstream may betransmitted to the decoding device through a storage medium or anetwork.

The residual information may include residual coding syntax, which willbe described later. The encoding device may transform/quantize theresidual samples to derive quantized transform coefficients. Theresidual information may include information on the quantized transformcoefficients.

Meanwhile, as described above, the encoding device may generate areconstructed picture (including reconstructed samples and reconstructedblocks). To this end, the encoding device may derive (modified) residualsamples by performing inverse quantization/inverse transformation on thequantized transform coefficients again. The reason for performing theinverse quantization/inverse transformation again aftertransforming/quantizing the residual samples in this way is to derivethe same residual samples as the residual samples derived in thedecoding device as described above. The encoding device may generate areconstructed block including reconstructed samples for the currentblock based on the prediction samples and the (modified) residualsamples. A reconstructed picture for the current picture may begenerated based on the reconstructed block. As described above, anin-loop filtering procedure may be further applied to the reconstructedpicture.

FIG. 5 illustrates an example of an intra prediction-based video/imageencoding method.

The decoding device may perform an operation corresponding to theoperation performed by the encoding apparatus.

Prediction information and residual information may be obtained from abitstream. Residual samples for the current block may be derived basedon the residual information. Specifically, transform coefficients may bederived by performing inverse quantization based on the quantizedtransform coefficients derived based on the residual information,residual samples for the current block may be derived by performinginverse transform on the transform coefficients.

Specifically, the decoding device may derive the intra predictionmode/type for the current block based on the received predictioninformation (intra prediction mode/type information) S500. The decodingdevice may derive neighboring reference samples of the current blockS510. The decoding device generates prediction samples in the currentblock based on the intra prediction mode/type and the neighboringreference samples S520. In this case, the decoding device may perform aprediction sample filtering procedure. The Predictive sample filteringmay be referred to as post filtering. Some or all of the predictionsamples may be filtered by the prediction sample filtering procedure. Insome cases, the prediction sample filtering procedure may be omitted.

The decoding device generates residual samples for the current blockbased on the received residual information S530. The decoding device maygenerate reconstructed samples for the current block based on theprediction samples and the residual samples, and may derive areconstructed block including the reconstructed samples S540. Areconstructed picture for the current picture may be generated based onthe reconstructed block. As described above, an in-loop filteringprocedure may be further applied to the reconstructed picture.

The intra prediction mode information may include, for example, flaginformation (ex. intra_luma_mpm_flag) indicating whether MPM (mostprobable mode) is applied to the current block or whether a remainingmode is applied, and, when the MPM is applied to the current block, theprediction mode information may further include index information (e.g.,intra_luma_mpm_idx) indicating one of the intra prediction modecandidates (MPM candidates). The intra prediction mode candidates (MPMcandidates) may be constructed of an MPM candidate list or an MPM list.In addition, when the MPM is not applied to the current block, the intraprediction mode information includes remaining mode information (ex.intra_luma_mpm_remainder) indicating one of the remaining intraprediction modes except for the intra prediction mode candidates (MPMcandidates). The decoding device may determine the intra prediction modeof the current block based on the intra prediction mode information.

Also, the intra prediction type information may be implemented invarious forms. For example, the intra prediction type information mayinclude intra prediction type index information indicating one of theintra prediction types. As another example, the intra prediction typeinformation may include at least one of reference sample lineinformation (ex. intra_luma_ref_idx) representing whether the MRL isapplied to the current block and, if applied, which reference sampleline is used, ISP flag information representing whether the ISP isapplied to the current block (ex. intra_subpartitions_mode_flag), ISPtype information indicating a split type of subpartitions when the ISPis applied (ex. intra_subpartitions_split_flag), flag informationrepresenting whether the PDPC is applied or flag informationrepresenting whether the LIP is applied. Also, the intra prediction typeinformation may include a MIP flag representing whether matrix-basedintra prediction (MIP) is applied to the current block.

The intra prediction mode information and/or the intra prediction typeinformation may be encoded/decoded through a coding method described inthe present disclosure. For example, the intra prediction modeinformation and/or the intra prediction type information may beencoded/decoded through entropy coding (e.g., CABAC, CAVLC).

FIG. 6 schematically shows an intra prediction procedure.

Referring to FIG. 6 , as described above, the intra prediction proceduremay include a step of determining an intra prediction mode/type, a stepof deriving neighboring reference samples, and a step of performingintra prediction (generating a prediction sample). The intra predictionprocedure may be performed by the encoding device and the decodingdevice as described above. In the present disclosure, a coding devicemay include the encoding device and/or the decoding device.

Referring to FIG. 6 , the coding device determines an intra predictionmode/type S600.

The encoding device may determine an intra prediction mode/type appliedto the current block from among the various intra prediction modes/typesdescribed above, and may generate prediction related information. Theprediction related information may include intra prediction modeinformation representing an intra prediction mode applied to the currentblock and/or intra prediction type information representing an intraprediction type applied to the current block. The decoding device maydetermine an intra prediction mode/type applied to the current blockbased on the prediction related information.

The intra prediction mode information may include, for example, flaginformation (ex. intra_luma_mpm_flag) representing whether a mostprobable mode (MPM) is applied to the current block or a remaining modeis applied, and the When the MPM is applied to the current block, theprediction mode information may further include index information (e.g.,intra_luma_mpm_idx) indicating one of the intra prediction modecandidates (MPM candidates). The intra prediction mode candidates (MPMcandidates) may be constructed of an MPM candidate list or an MPM list.In addition, when the MPM is not applied to the current block, the intraprediction mode information may further include remaining modeinformation (ex. intra_luma_mpm_remainder) indicating one of theremaining intra prediction modes except for the intra prediction modecandidates (MPM candidates). The decoding device may determine the intraprediction mode of the current block based on the intra prediction modeinformation.

In addition, the intra prediction type information may be implemented invarious forms. For example, the intra prediction type information mayinclude intra prediction type index information indicating one of theintra prediction types. As another example, the intra prediction typeinformation may include at least one of reference sample lineinformation (ex. intra_luma_ref_idx) representing whether the MRL isapplied to the current block and, if applied, which reference sampleline is used, ISP flag information representing whether the ISP isapplied to the current block (ex. intra_subpartitions_mode_flag), ISPtype information indicating a split type of subpartitions when the ISPis applied (ex. intra_subpartitions_split_flag), flag informationrepresenting whether the PDPC is applied or flag informationrepresenting whether the LIP is applied. Also, the intra prediction typeinformation may include a MIP flag representing whether matrix-basedintra prediction (MIP) is applied to the current block.

For example, when intra prediction is applied, an intra prediction modeapplied to the current block may be determined using an intra predictionmode of a neighboring block. For example, the coding device may selectone of most probable mode (MPM) candidates in the MPM list derived basedon additional candidate modes and/or an intra prediction mode of theneighboring block (e.g., the left and/or top neighboring block) of thecurrent block, or select one of the remaining intra prediction modes notincluded in the MPM candidates (and planar mode) based on the MPMremainder information (remaining intra prediction mode information). TheMPM list may be configured to include or not include the planner mode asa candidate. For example, when the MPM list includes a planner mode as acandidate, the MPM list may have 6 candidates, and when the MPM listdoes not include a planner mode as a candidate, the MPM list may have 5candidates. When the MPM list does not include the planar mode as acandidate, a not planar flag (ex. intra_luma_notplanar_flag)representing whether the intra prediction mode of the current block isnot the planar mode may be signaled. For example, the MPM flag may besignaled first, and the MPM index and not planner flag may be signaledwhen the value of the MPM flag is 1. Also, the MPM index may be signaledwhen the value of the not planner flag is 1. Here, the fact that the MPMlist is configured not to include the planner mode as a candidate isthat the planner mode is always considered as MPM rather than that theplanner mode is not MPM, thus, the flag (not planar flag) is signaledfirst to check whether it is the planar mode.

For example, whether the intra prediction mode applied to the currentblock is among the MPM candidates (and the planar mode) or the remainingmodes may be indicated based on the MPM flag (e.g.,intra_luma_mpm_flag). The MPM flag with a value of 1 may indicate thatthe intra prediction mode for the current block is within MPM candidates(and planar mode), and The MPM flag with a value of 0 may indicate thatthe intra prediction mode for the current block is not within MPMcandidates (and planar mode). The not planar flag (ex.intra_luma_not_planar_flag) with a value of 0 may indicate that theintra prediction mode for the current block is a planar mode, and thenot planar flag with a value of 1 may indicate that the intra predictionmode for the current block is not the planar mode. The MPM index may besignaled in the form of an mpm_idx or intra_luma_mpm_idx syntax element,and the remaining intra prediction mode information may be signaled inthe form of a rem_intra_luma_pred_mode or intra_luma_mpm_remaindersyntax element. For example, the remaining intra prediction modeinformation may indicate one of the remaining intra prediction modes notincluded in the MPM candidates (and planar mode) among all intraprediction modes by indexing in the order of prediction mode number. Theintra prediction mode may be an intra prediction mode for a lumacomponent (sample). Hereinafter, the intra prediction mode informationmay include at least one of the MPM flag (ex. intra_luma_mpm_flag), thenot planar flag (ex. intra_luma_not_planar_flag), the MPM index (ex.mpm_idx or intra_luma_mpm_idx), or the remaining intra prediction modeinformation (rem_intra_luma_luma_mpm_mode or intra_luma_mpminder). Inthe present disclosure, the MPM list may be referred to by various termssuch as an MPM candidate list and candModeList.

When the MIP is applied to the current block, a separate MPM flag (ex.intra_mip_mpm_flag) for the MIP, an MPM index (ex. intra_mip_mpm_idx),and remaining intra prediction mode information (ex.intra_mip_mpm_remainder) may be signaled, and the not planar flag maynot be signaled.

In other words, in general, when a block partition for an image isperformed, the current block to be coded and a neighboring block havesimilar image characteristics. Therefore, there is a high probabilitythat the current block and the neighboring block have the same orsimilar intra prediction mode. Accordingly, the encoder may use theintra prediction mode of the neighboring block to encode the intraprediction mode of the current block.

The coding device may construct a most probable modes (MPM) list for thecurrent block. The MPM list may be referred to as the MPM candidatelist. Here, the MPM may refer to modes used to improve coding efficiencyin consideration of the similarity between the current block and theneighboring blocks during intra prediction mode coding. As describedabove, the MPM list may be constructed to include the planar mode, ormay be constructed to exclude the planar mode. For example, when the MPMlist includes the planar mode, the number of candidates in the MPM listmay be 6. And, when the MPM list does not include the planar mode, thenumber of candidates in the MPM list may be 5.

The encoding device may perform prediction based on various intraprediction modes, and may determine an optimal intra prediction modebased on rate-distortion optimization (RDO) based thereon. In this case,the encoding device may determine the optimal intra prediction mode byusing only the MPM candidates and planar mode configured in the MPMlist, or by further using the remaining intra prediction modes as wellas the MPM candidates and planar mode configured in the MPM list.Specifically, for example, if the intra prediction type of the currentblock is a specific type (ex. LIP, MRL, or ISP) other than the normalintra prediction type, the encoding device may determine the optimalintra prediction mode by considering only the MPM candidates and theplanar mode as intra prediction mode candidates for the current block.That is, in this case, the intra prediction mode for the current blockmay be determined only from among the MPM candidates and the planarmode, and in this case, encoding/signaling of the MPM flag may not beperformed. In this case, the decoding device may infer that the MPM flagis 1 without separately signaling the MPM flag.

Meanwhile, in general, when the intra prediction mode of the currentblock is not the planar mode and is one of the MPM candidates in the MPMlist, the encoding device generates an MPM index (mpm idx) indicatingone of the MPM candidates. when the intra prediction mode of the currentblock is not included in the MPM list, the encoding device generates MPMreminder information (remaining intra prediction mode information)indicating the same mode as the intra prediction mode of the currentblock among the remaining intra prediction modes not included in the MPMlist (and planar mode). The MPM reminder information may include, forexample, an intra_luma_mpm_remainder syntax element.

The decoding device obtains intra prediction mode information from thebitstream. As described above, the intra prediction mode information mayinclude at least one of an MPM flag, a not planner flag, an MPM index,and MPM remaster information (remaining intra prediction modeinformation). The decoding device may construct the MPM list. The MPMlist is constructed the same as the MPM list constructed in the encodingdevice. That is, the MPM list may include intra prediction modes ofneighboring blocks, or may further include specific intra predictionmodes according to a predetermined method.

The decoding device may determine the intra prediction mode of thecurrent block based on the MPM list and the intra prediction modeinformation. For example, when the value of the MPM flag is 1, thedecoding device may derive the planar mode as the intra prediction modeof the current block (based on not planar flag) or derive the candidateindicated by the MPM index from among the MPM candidates in the MPM listas the intra prediction mode of the current block. Here, the MPMcandidates may represent only candidates included in the MPM list, ormay include not only candidates included in the MPM list but also theplanar mode applicable when the value of the MPM flag is 1.

As another example, when the value of the MPM flag is 0, the decodingdevice may derive an intra prediction mode indicated by the remainingintra prediction mode information (which may be referred to as mpmremainder information) among the remaining intra prediction modes notincluded in the MPM list and the planner mode as the intra predictionmode of the current block. Meanwhile, as another example, when the intraprediction type of the current block is a specific type (ex. LIP, MRL orISP, etc.), the decoding device may derive a candidate indicated by theMPM flag in the planar mode or the MPM list as the intra prediction modeof the current block without parsing/decoding/checking the MPM flag.

The coding device derives neighboring reference samples of the currentblock S610. When intra prediction is applied to the current block, theneighboring reference samples to be used for the intra prediction of thecurrent block may be derived. The neighboring reference samples of thecurrent block may include a sample adjacent to the left boundary of thecurrent block of size nW×nH and a total of 2×nH samples adjacent to thebottom-left of the current block, a sample adjacent to the top boundaryof the current block and a total of 2×nW samples adjacent to thetop-right and a sample adjacent to the top-left of the current block.Alternatively, the neighboring reference samples of the current blockmay include a plurality of columns of top neighboring samples and aplurality of rows of left neighboring samples. In addition, theneighboring reference samples of the current block may include a totalof nH samples adjacent to the right boundary of the current block ofsize nW×nH, a total of nW samples adjacent to the bottom boundary of thecurrent block and a sample adjacent to the bottom-right of the currentblock.

On the other hand, when the MRL is applied (that is, when the value ofthe MRL index is greater than 0), the neighboring reference samples maybe located on lines 1 to 2 instead of line 0 adjacent to the currentblock on the left/top side, and in this case, the number of theneighboring reference samples may be further increased. Meanwhile, whenthe ISP is applied, the neighboring reference samples may be derived inunits of sub-partitions.

The coding device derives prediction samples by performing intraprediction on the current block S620. The coding device may derive theprediction samples based on the intra prediction mode/type and theneighboring samples. The coding device may derive a reference sampleaccording to an intra prediction mode of the current block amongneighboring reference samples of the current block, and may derive aprediction sample of the current block based on the reference sample.

Meanwhile, when inter prediction is applied, the predictor of theencoding apparatus/decoding apparatus may derive prediction samples byperforming inter prediction in units of blocks. The inter prediction maybe applied when performing the prediction on the current block. That is,the predictor (more specifically, inter predictor) of theencoding/decoding apparatus may derive prediction samples by performingthe inter prediction in units of the block. The inter prediction mayrepresent prediction derived by a method dependent to the data elements(e.g., sample values or motion information) of a picture(s) other thanthe current picture. When the inter prediction is applied to the currentblock, a predicted block (prediction sample array) for the current blockmay be derived based on a reference block (reference sample array)specified by the motion vector on the reference picture indicated by thereference picture index. In this case, in order to reduce an amount ofmotion information transmitted in the inter-prediction mode, the motioninformation of the current block may be predicted in units of a block, asubblock, or a sample based on a correlation of the motion informationbetween the neighboring block and the current block. The motioninformation may include the motion vector and the reference pictureindex. The motion information may further include inter-prediction type(L0 prediction, L1 prediction, Bi prediction, etc.) information. In thecase of applying the inter prediction, the neighboring block may includea spatial neighboring block which is present in the current picture anda temporal neighboring block which is present in the reference picture.A reference picture including the reference block and a referencepicture including the temporal neighboring block may be the same as eachother or different from each other. The temporal neighboring block maybe referred to as a name such as a collocated reference block, acollocated CU (colCU), etc., and the reference picture including thetemporal neighboring block may be referred to as a collocated picture(colPic). For example, a motion information candidate list may beconfigured based on the neighboring blocks of the current block and aflag or index information indicating which candidate is selected (used)may be signaled in order to derive the motion vector and/or referencepicture index of the current block. The inter prediction may beperformed based on various prediction modes and for example, in the caseof a skip mode and a merge mode, the motion information of the currentblock may be the same as the motion information of the selectedneighboring block. In the case of the skip mode, the residual signal maynot be transmitted unlike the merge mode. In the case of a motion vectorprediction (MVP) mode, the motion vector of the selected neighboringblock may be used as a motion vector predictor and a motion vectordifference may be signaled. In this case, the motion vector of thecurrent block may be derived by using a sum of the motion vectorpredictor and the motion vector difference.

The motion information may further include L0 motion information and/orL1 motion information according to the inter-prediction type (L0prediction, L1 prediction, Bi prediction, etc.). A L0-direction motionvector may be referred to as an L0 motion vector or MVL0 and anL1-direction motion vector may be referred to as an L1 motion vector orMVL1. A prediction based on the L0 motion vector may be referred to asan L0 prediction, a prediction based on the L1 motion vector may bereferred to as an L1 prediction, and a prediction based on both the L0motion vector and the L1 motion vector may be referred to as abi-prediction. Here, the L0 motion vector may indicate a motion vectorassociated with a reference picture list L0 and the L1 motion vector mayindicate a motion vector associated with a reference picture list L1.The reference picture list L0 may include pictures prior to the currentpicture in an output order and the reference picture list L1 may includepictures subsequent to the current picture in the output order, as thereference pictures. The prior pictures may be referred to as a forward(reference) picture and the subsequent pictures may be referred to as areverse (reference) picture. The reference picture list L0 may furtherinclude the pictures subsequent to the current picture in the outputorder as the reference pictures. In this case, the prior pictures may befirst indexed in the reference picture list L0 and the subsequentpictures may then be indexed. The reference picture list L1 may furtherinclude the pictures prior to the current picture in the output order asthe reference pictures. In this case, the subsequent pictures may befirst indexed in the reference picture list L1 and the prior picturesmay then be indexed. Here, the output order may correspond to a pictureorder count (POC) order.

A video/image encoding process based on inter prediction mayschematically include, for example, the following.

FIG. 7 illustrates an example of an inter prediction-based video/imageencoding method.

The encoding apparatus performs the inter prediction for the currentblock (S700). The encoding apparatus may derive the inter predictionmode and the motion information of the current block and generate theprediction samples of the current block. Here, an inter prediction modedetermining process, a motion information deriving process, and ageneration process of the prediction samples may be simultaneouslyperformed and any one process may be performed earlier than otherprocess. For example, the inter-prediction unit of the encodingapparatus may include a prediction mode determination unit, a motioninformation derivation unit, and a prediction sample derivation unit,and the prediction mode determination unit may determine the predictionmode for the current block, the motion information derivation unit mayderive the motion information of the current block, and the predictionsample derivation unit may derive the prediction samples of the currentblock. For example, the inter-prediction unit of the encoding apparatusmay search a block similar to the current block in a predetermined area(search area) of reference pictures through motion estimation and derivea reference block in which a difference from the current block isminimum or is equal to or less than a predetermined criterion. Areference picture index indicating a reference picture at which thereference block is positioned may be derived based thereon and a motionvector may be derived based on a difference in location between thereference block and the current block. The encoding apparatus maydetermine a mode applied to the current block among various predictionmodes. The encoding apparatus may compare RD cost for the variousprediction modes and determine an optimal prediction mode for thecurrent block.

For example, when the skip mode or the merge mode is applied to thecurrent block, the encoding apparatus may configure a merging candidatelist to be described below and derive a reference block in which adifference from the current block is minimum or is equal to or less thana predetermined criterion among reference blocks indicated by mergecandidates included in the merging candidate list. In this case, a mergecandidate associated with the derived reference block may be selectedand merge index information indicating the selected merge candidate maybe generated and signaled to the decoding apparatus. The motioninformation of the current block may be derived by using the motioninformation of the selected merge candidate.

As another example, when an (A)MVP mode is applied to the current block,the encoding apparatus may configure an (A)MVP candidate list to bedescribed below and use a motion vector of a selected mvp candidateamong motion vector predictor (mvp) candidates included in the (A)MVPcandidate list as the mvp of the current block. In this case, forexample, the motion vector indicating the reference block derived by themotion estimation may be used as the motion vector of the current blockand an mvp candidate having a motion vector with a smallest differencefrom the motion vector of the current block among the mvp candidates maybecome the selected mvp candidate. A motion vector difference (MVD)which is a difference obtained by subtracting the mvp from the motionvector of the current block may be derived. In this case, theinformation on the MVD may be signaled to the decoding apparatus.Further, when the (A)MVP mode is applied, the value of the referencepicture index may be configured as reference picture index informationand separately signaled to the decoding apparatus.

The encoding apparatus may derive the residual samples based on thepredicted samples (S710). The encoding apparatus may derive the residualsamples by comparing original samples and the prediction samples of thecurrent block.

The encoding apparatus encodes image information including predictioninformation and residual information (S720). The encoding apparatus mayoutput the encoded image information in the form of a bitstream. Theprediction information may include information on prediction modeinformation (e.g., skip flag, merge flag or mode index, etc.) andinformation on motion information as information related to theprediction procedure. The information on the motion information mayinclude candidate selection information (e.g., merge index, mvp flag ormvp index) which is information for deriving the motion vector. Further,the information on the motion information may include the information onthe MVD and/or the reference picture index information. Further, theinformation on the motion information may include information indicatingwhether to apply the L0 prediction, the L1 prediction, or thebi-prediction. The residual information is information on the residualsamples. The residual information may include information on quantizedtransform coefficients for the residual samples.

An output bitstream may be stored in a (digital) storage medium andtransferred to the decoding apparatus or transferred to the decodingapparatus via the network.

Meanwhile, as described above, the encoding apparatus may generate areconstructed picture (including reconstructed samples and reconstructedblocks) based on the reference samples and the residual samples. This isto derive the same prediction result as that performed by the decodingapparatus, and as a result, coding efficiency may be increased.Accordingly, the encoding apparatus may store the reconstruction picture(or reconstruction samples or reconstruction blocks) in the memory andutilize the reconstruction picture as the reference picture. The in-loopfiltering process may be further applied to the reconstruction pictureas described above.

A video/image decoding process based on inter prediction mayschematically include, for example, the following.

FIG. 8 illustrates an example of an inter prediction-based video/imagedecoding method.

Referring to FIG. 8 , the decoding apparatus may perform an operationcorresponding to the operation performed by the encoding apparatus. Thedecoding apparatus may perform the prediction for the current blockbased on received prediction information and derive the predictionsamples.

Specifically, the decoding apparatus may determine the prediction modefor the current block based on the received prediction information(S800). The decoding apparatus may determine which inter prediction modeis applied to the current block based on the prediction mode informationin the prediction information.

For example, it may be determined whether the merge mode or the (A)MVPmode is applied to the current block based on the merge flag.Alternatively, one of various inter prediction mode candidates may beselected based on the mode index. The inter prediction mode candidatesmay include a skip mode, a merge mode, and/or an (A)MVP mode or mayinclude various inter prediction modes to be described below.

The decoding apparatus derives the motion information of the currentblock based on the determined inter prediction mode (S810). For example,when the skip mode or the merge mode is applied to the current block,the decoding apparatus may configure the merge candidate list to bedescribed below and select one merge candidate among the mergecandidates included in the merge candidate list. Here, the selection maybe performed based on the selection information (merge index). Themotion information of the current block may be derived by using themotion information of the selected merge candidate. The motioninformation of the selected merge candidate may be used as the motioninformation of the current block.

As another example, when an (A)MVP mode is applied to the current block,the decoding apparatus may configure an (A)MVP candidate list to bedescribed below and use a motion vector of a selected mvp candidateamong motion vector predictor (mvp) candidates included in the (A)MVPcandidate list as the mvp of the current block. Here, the selection maybe performed based on the selection information (mvp flag or mvp index).In this case, the MVD of the current block may be derived based on theinformation on the MVD, and the motion vector of the current block maybe derived based on the mvp of the current block and the MVD. Further,the reference picture index of the current block may be derived based onthe reference picture index information. The picture indicated by thereference picture index in the reference picture list for the currentblock may be derived as the reference picture referred for the interprediction of the current block.

Meanwhile, as described below, the motion information of the currentblock may be derived without a candidate list configuration and in thiscase, the motion information of the current block may be derivedaccording to a procedure disclosed in the prediction mode. In this case,the candidate list configuration may be omitted.

The decoding apparatus may generate the prediction samples for thecurrent block based on the motion information of the current block(S820). In this case, the reference picture may be derived based on thereference picture index of the current block and the prediction samplesof the current block may be derived by using the samples of thereference block indicated by the motion vector of the current block onthe reference picture. In this case, in some cases, a predicted samplefiltering procedure for all or some of the prediction samples of thecurrent block may be further performed.

For example, the inter-prediction unit of the decoding apparatus mayinclude a prediction mode determination unit, a motion informationderivation unit, and a prediction sample derivation unit, and theprediction mode determination unit may determine the prediction mode forthe current block based on the received prediction mode information, themotion information derivation unit may derive the motion information(the motion vector and/or reference picture index) of the current blockbased on the information on the received motion information, and theprediction sample derivation unit may derive the predicted samples ofthe current block.

The decoding apparatus generates the residual samples for the currentblock based on the received residual information (S830). The decodingapparatus may generate the reconstruction samples for the current blockbased on the prediction samples and the residual samples and generatethe reconstruction picture based on the generated reconstruction samples(S840). Thereafter, the in-loop filtering procedure may be furtherapplied to the reconstruction picture as described above.

FIG. 9 schematically shows an inter prediction procedure.

Referring to FIG. 9 , as described above, the inter prediction processmay include an inter prediction mode determination step, a motioninformation derivation step according to the determined prediction mode,and a prediction processing (prediction sample generation) step based onthe derived motion information. The inter prediction process may beperformed by the encoding apparatus and the decoding apparatus asdescribed above. In this document, a coding device may include theencoding apparatus and/or the decoding apparatus.

Referring to FIG. 9 , the coding apparatus determines an interprediction mode for the current block (S900). Various inter predictionmodes may be used for the prediction of the current block in thepicture. For example, various modes, such as a merge mode, a skip mode,a motion vector prediction (MVP) mode, an affine mode, a subblock mergemode, a merge with MVD (MMVD) mode, and a historical motion vectorprediction (HMVP) mode may be used. A decoder side motion vectorrefinement (DMVR) mode, an adaptive motion vector resolution (AMVR)mode, a bi-prediction with CU-level weight (BCW), a bi-directionaloptical flow (BDOF), and the like may be further used as additionalmodes. The affine mode may also be referred to as an affine motionprediction mode. The MVP mode may also be referred to as an advancedmotion vector prediction (AMVP) mode. In the present document, somemodes and/or motion information candidates derived by some modes mayalso be included in one of motion information-related candidates inother modes. For example, the HMVP candidate may be added to the mergecandidate of the merge/skip modes, or also be added to an mvp candidateof the MVP mode. If the HMVP candidate is used as the motion informationcandidate of the merge mode or the skip mode, the HMVP candidate may bereferred to as the HMVP merge candidate.

The prediction mode information indicating the inter prediction mode ofthe current block may be signaled from the encoding apparatus to thedecoding apparatus. In this case, the prediction mode information may beincluded in the bitstream and received by the decoding apparatus. Theprediction mode information may include index information indicating oneof multiple candidate modes. Alternatively, the inter prediction modemay be indicated through a hierarchical signaling of flag information.In this case, the prediction mode information may include one or moreflags. For example, whether to apply the skip mode may be indicated bysignaling a skip flag, whether to apply the merge mode may be indicatedby signaling a merge flag when the skip mode is not applied, and it isindicated that the MVP mode is applied or a flag for additionaldistinguishing may be further signaled when the merge mode is notapplied. The affine mode may be signaled as an independent mode orsignaled as a dependent mode on the merge mode or the MVP mode. Forexample, the affine mode may include an affine merge mode and an affineMVP mode.

The coding apparatus derives motion information for the current block(S910). Motion information derivation may be derived based on the interprediction mode.

The coding apparatus may perform inter prediction using motioninformation of the current block. The encoding apparatus may deriveoptimal motion information for the current block through a motionestimation procedure. For example, the encoding apparatus may search asimilar reference block having a high correlation in units of afractional pixel within a predetermined search range in the referencepicture by using an original block in an original picture for thecurrent block and derive the motion information through the searchedreference block. The similarity of the block may be derived based on adifference of phase based sample values. For example, the similarity ofthe block may be calculated based on a sum of absolute differences (SAD)between the current block (or a template of the current block) and thereference block (or the template of the reference block). In this case,the motion information may be derived based on a reference block havinga smallest SAD in a search area. The derived motion information may besignaled to the decoding apparatus according to various methods based onthe inter prediction mode.

The coding apparatus performs inter prediction based on motioninformation for the current block (S920). The coding apparatus mayderive prediction sample(s) for the current block based on the motioninformation. A current block including prediction samples may bereferred to as a predicted block.

FIG. 10 schematically shows a hierarchical structure of coded imageinformation.

FIG. 10 may schematically show a video/image coded according to a codinglayer and structure of the present disclosure. Referring to FIG. 10 ,the coded video/image may be divided into a video coding layer (VCL)that processes the video/image and a video/image decoding process, asubsystem that transmits and stores coded information, and a networkabstraction layer (NAL) that is present between the VCL and thesubsystem and is in charge of functions.

For example, in the VCL, VCL data including compressed image data (slicedata) may be generated, or a picture parameter set (PPS), a sequenceparameter set (SPS), a video parameter set (VPS) or a parameter setincluding a supplemental enhancement information (SEI) messageadditionally required for an image decoding process may be generated.

For example, in the NAL, a NAL unit may be generated by adding headerinformation (NAL unit header) to a raw byte sequence payload (RBSP)generated in the VCL. In this case, the RBSP may refer to the slicedata, the parameter set, the SEI message, and the like generated in theVCL. The NAL unit header may include NAL unit type information specifiedaccording to RBSP data included in the corresponding NAL unit.

For example, as shown in FIG. 10 , a NAL unit may be classified into aVCL NAL unit and a non-VCL NAL unit according to the RBSP generated inthe VCL. The VCL NAL unit may refer to a NAL unit including information(slice data) on an image and the non-VCL NAL unit may refer to a NALunit including information (a parameter set or an SEI message) requiredfor image decoding.

Header information may be attached to the above-described VCL NAL unitand non-VCL NAL unit according to a data standard of the subsystem andthe VCL NAL unit and the non-VCL NAL unit including the headerinformation may be transmitted through a network. For example, a NALunit may be converted into a data format of a predetermined standardsuch as H.266/VVC file format, real-time transport protocol (RTP),transport stream (TS), or the like and transmitted over variousnetworks.

In addition, as described above, the type of a NAL unit may be specifiedaccording to an RBSP data structure included in the NAL unit, andinformation on the NAL unit type may be stored and signaled in a NALunit header.

For example, a NAL unit may be classified into a VCL NAL unit type and anon-VCL NAL unit type according to whether it includes information(slice data) on an image. In addition, the VCL NAL unit type may beclassified according to characteristics and types of pictures includedin the VCL NAL unit, and the non-VCL NAL unit type may be classifiedaccording to the type of a parameter set.

The following may be an example of NAL unit types specified according tothe type of a parameter set included in the non-VCL NAL unit type.

-   -   Adaptation parameter set (APS) NAL unit: Type for a NAL unit        including an APS    -   Decoding parameter set (DPS) NAL unit: Type for a NAL unit        including a DPS    -   Video parameter set (VPS) NAL unit: Type for a NAL unit        including a VPS    -   Sequence parameter set (SPS) NAL unit: Type for a NAL unit        including an SPS    -   Picture parameter set (PPS) NAL unit: Type for a NAL unit        including a PPS    -   Picture header (PH) NAL unit: Type for a NAL unit including a PH

The above-described NAL unit types may have syntax information on theNAL unit types, and the syntax information may be stored and signaled ina NAL unit header. For example, the syntax information may benal_unit_type, and the NAL unit type may be specified as a nal_unit_typevalue.

Meanwhile, as described above, one picture may include a plurality ofslices, and a slice may include a slice header and slice data. In thiscase, one picture header may be added (embedded) for a plurality ofslices (a set of slice headers and slice data). The picture header(picture header syntax) may include information/parameters that can becommonly applied to pictures. The slice header (slice header syntax) mayinclude information/parameters that can be commonly applied to slices.The APS (APS syntax) or the PPS (PPS syntax) may includeinformation/parameters that can be commonly applied to one or moreslices or pictures. The SPS (SPS syntax) may includeinformation/parameters that can be commonly applied to one or moresequences. The VPS (VPS syntax) may include information/parameters thatcan be commonly applied to a plurality of layers. The DPS (DPS syntax)may include information/parameters that can be commonly applied to theentire image. The DPS may include information/parameters related toconcatenation of a coded video sequence (CVS). In the presentdisclosure, a high level syntax (HLS) may include at least one of theAPS syntax, the PPS syntax, the SPS syntax, the VPS syntax, the DPSsyntax, the picture header syntax, and the slice header syntax.

Meanwhile, as described above, one NAL unit type may be set for onepicture, in general, and the NAL unit type may be signaled throughnal_unit_type in the NAL unit header of the NAL unit including slices,as described above. The following table shows an example of NAL unittype code and NAL unit type class.

TABLE 1 Name of Content of NAL unit and NAL unit nal_unit_typenal_unit_type RBSP syntax structure type class 0 TRAIL_NUT Coded sliceof a trailing picture VCL slice_layer_rbsp( ) 1 STSA_NUT Coded slice ofan STSA picture VCL slice_layer_rbsp( ) 2 RADL_NUT Coded slice of a RADLpicture VCL slice_layer_rbsp( ) 3 RASL_NUT Coded slice of a RASL pictureVCL slice_layer_rbsp( ) 4 . . . 6 RSV_VCL_4 . . . Reserved non-IRAP VCLNAL unit types VCL RSV_VCL_6 7 IDR_W_RADL Coded slice of an IDR pictureVCL 8 IDR_N_LP slice_layer_rbsp( ) 9 CRA_NUT Coded slice of a CRApicture VCL silce_layer_rbsp( ) 10 GDR_NUT Coded slice of a GDR pictureVCL slice_layer_rbsp( ) 11 RSV_IRAP_11 Reserved IRAP VCL NAL unit typesVCL 12 RSV_IRAP_12 13 DPS_NUT Decoding parameter set non-VCLdecoding_parameter_set_rbsp( ) 14 VPS_NUT Video parameter set non-VCLvideo_parameter_set_rbsp( ) 15 SPS_NUT Sequence parameter set non-VCLseq_parameter_set_rbsp( ) 16 PPS_NUT Picture parameter set non-VCLpic_parameter_set_rbsp( ) 17 PREFIX_APS_NUT Adaptation parameter setnon-VCL 18 SUFFIX_APS_NUT adaptation_parameter_set_rbsp( ) 19 PH_NUTPicture header non-VCL picture_header_rbsp( ) 20 AUD_NUT AU delimiternon-VCL access_unit_delimiter_rbsp( ) 21 EOS_NUT End of sequence non-VCLend_of_seq_rbsp( ) 22 EOB_NUT End of bitstream non-VCLend_of_bitstream_rbsp( ) 23 PREFIX_SEI_NUT Supplemental enhancementinformation non-VCL 24 SUFFIX_SEI_NUT sei_rbsp( ) 25 FD_NUT Filler datanon-VCL filler_data_rbsp( ) 26 RSV_NVCL_26 Reserved non-VCL NAL unittypes non-VCL 27 RSV_NVCL_27 28 . . . 31 UNSPEC_28 . . . Unspecifiednon-VCL NAL unit types non-VCL UNSPEC_31

Meanwhile, as described above, a picture may be composed of one or moreslices. In addition, parameters describing the picture may be signaledthrough a picture header (PH), and parameters describing a slice may besignaled through a slice header (SH). The PH may be delivered in its ownNAL unit type. Further, the SH may be present at the beginning of a NALunit including a payload of a slice (i.e., slice data).

For example, syntax elements of a signaled PH may be as follows.

TABLE 2 Descriptor picture_header_rbsp( ) {  non_reference_picture_flagu(1)  gdr_pic_flag u(1)  no_output_of_prior_pics_flag u(1)  if(gdr_pic_flag )   recovery_poc_cnt ue(v)  ph_pic_parameter_set_id ue(v) if( sps_poc_msb_flag ) {   ph_poc_msb_present_flag u(1)   if(ph_poc_msb_present_flag )    poc_msb_val u(v)  }  if(sps_subpic_id_present_flag && !sps_subpic_id_signalling_flag ) {  ph_subpic_id_signalling_present_flag u(1)   if(ph_subpics_id_signalling_present_flag ) {    ph_subpic_id_len_minus1ue(v)    for( i = 0; i <= sps_num_subpics_minus1; i++ )    ph_subpic_id[ i ] u(v)   }  }  if(!sps_loop_filter_across_virtual_boundanes_disabled_present_flag ) {  ph_loop_filter_across_virtual_boundaries_disabled_present_flag u(1)  if( ph_loop_filter_across_virtual_boundaries_disabled_present_flag ) {   ph_num_ver_virtual_boundaries u(2)    for( i = 0; i <ph_num_ver_virtual_boundaries; i++ )     ph_virtual_boundaries_pos_x[ i] u(13)    ph_num_hor_virtual_boundaries u(2)    for( i = 0; i <ph_num_hor_virtual_boundaries; i++ )     ph_virtual_boundaries_pos_y[ i] u(13)   }  }  if( separate_colour_plane_flag = = 1 )   colour_plane_idu(2)  if( output_flag_present_flag )   pic_output_flag u(1) pic_rpl_present_flag u(1)  if( pic_rpl_present_flag ) {   for( i = 0; i< 2; i++ ) {    if( num_ref_pic_lists_in_sps[ i ] > 0 &&!pps_ref_pic_list_sps_idc[ i ] & &       ( i = = 0 | | ( i = = 1 &&rpl1_idx_present_flag ) ) )     pic_rpl_sps_flag[ i ] u(1)    if(pic_rpl_sps_flag[ i ] ) {     if( num_ref_pic_lists_in_sps[ i ] > 1 &&       ( i = = 0 | | ( i = = 1 && rpl1_idx_present_flag ) ) )     pic_rpl_idx[ i ] u(v)    } else     ref_pic_list_struct( i,num_ref_pic_lists_in_sps[ i ] )    for( j = 0; j < NumLtrpEntries[ i ][RplsIdx[ i ] ]; j++ ) {     if( ltrp_in_slice_header_flag[ i ][ RplsIdx[i ] ] )      pic_poc_lsb_lt[ i ][ j ] u(v)    pic_delta_poc_msb_present_flag[ i ][ j ] u(1)     if(pic_delta_poc_msb_present_flag[ i ][ j ] )     pic_delta_poc_msb_cycle_lt[ i ][ j ] ue(v)    }   }  }  if(partition_constraints_override_enabled_flag ) {  partition_constraints_override_flag ue(v)   if(partition_constraints_override_flag ) {   pic_log2_diff_min_qt_min_cb_intra_slice_luma ue(v)   pic_log2_diff_min_qt_min_cb_inter_slice ue(v)   pic_max_mtt_hierarchy_depth_inter_slice ue(v)   pic_max_mtt_hierarchy_depth_intra_slice_luma ue(v)    if(pic_max_mtt_hierarchy_depth_intra_slice_luma != 0 ) {    pic_log2_diff_max_bt_min_qt_intra_slice_luma ue(v)    pic_log2_diff_max_tt_min_qt_intra_slice_luma ue(v)    }    if(pic_max_mtt_hierarchy_depth_inter_slice != 0 ) {    pic_log2_diff_max_bt_min_qt_inter_slice ue(v)    pic_log2_diff_max_tt_min_qt_inter_slice ue(v)    }    if(qtbtt_dual_tree_intra_flag ) {    pic_log2_diff_min_qt_min_cb_intra_slice_chroma ue(v)    pic_max_mtt_hierarchy_depth_intra_slice_chroma ue(v)     if(pic_max_mtt_hierarchy_depth_intra_slice_chroma != 0 ) {     pic_log2_diff_max_bt_min_qt_intra_slice_chroma ue(v)     pic_log2_diff_max_tt_min_qt_intra_slice_chroma ue(v)     }    }   } }  if( cu_qp_delta_enabled_flag ) {  pic_cu_qp_delta_subdiv_intra_slice ue(v)  pic_cu_qp_delta_subdiv_inter_slice ue(v)  }  if(pps_cu_chroma_qp_offset_list_enabled_flag ) {  pic_cu_chroma_qp_offset_subdiv_intra_slice ue(v)  pic_cu_chroma_qp_offset_subdiv_inter_slice ue(v)  }  if(sps_temporal_mvp_enabled_flag )   pic_temporal_mvp_enabled_flag u(1) if(!pps_mvd_l1_zero_idc )   mvd_l1_zero_flag u(1)  if(!pps_six_minus_max_num_merge_cand_plus1 )  pic_six_minus_max_num_merge_cand ue(v)  if( sps_affine_enabled_flag )  pic_five_minus_max_num_subblock_merge_cand ue(v)  if(sps_fpcl_mmvd_enabled_flag )   pic_fpel_mmvd_enabled_flag u(1)  if(sps_bdof_pic_present_flag )   pic_disable_bdof_flag u(1)  if(sps_dmvr_pic_present_flag )   pic_disable_dmvr_flag u(1)  if(sps_prof_pic_present_flag )   pic_disable_prof_flag u(1)  if(sps_triangle_enabled_flag && MaxNumMergeCand >= 2 &&   !pps_max_num_merge_cand_minus_max_num_triangle cand_plus1 )  pic_max_num_merge_cand_minus_max_num_triangle_cand ue(v)  if (sps_ibc_enabled_flag )   pic_six_minus_max_num_ibc_merge_cand ue(v)  if(sps_joint_cbcr_enabled_flag )   pic_joint_cbcr_sign_flag u(1)  if(sps_sao_enabled_flag ) {   pic_sao_enabled_present_flag u(1)   if(pic_sao_enable_present_flag ) {    pic_sao_luma_enabled_flag u(1)   if(ChromaArrayType != 0 )     pic_sao_chroma_enabled_flag u(1)   }  } if( sps_alf_enabled_flag ) {   pic_alf_enabled_present_flag u(1)   if(pic_alf_enabled_present_flag ) {    pic_alf_enabled_flag u(1)    if(pic_alf_enabled_flag ) {     pic_num_alf_aps_ids_luma u(3)     for( i =0; i < pic_num_alf_aps_ids_luma, i++ )      pic_alf_aps_id_luma[ i ]u(3)     if( ChromaArrayType != 0 )      pic_alf_chroma_idc u(2)     if(pic_alf_chroma_idc )      pic_alf_aps_id_chroma u(3)    }   }  }  if(!pps_dep_quant_enabled_flag )   pic_dep_quant_enabled_flag u(1)  if(!pic_dcp_quant_enabled_flag )   sign_data_hiding_enabled_flag u(1)  if(deblocking_filter_override_enabled_flag ) {  pic_deblocking_filter_override_present_flag u(1)   if(pic_deblocking_filter_override_present_flag ) {   pic_deblocking_filter_override_flag u(1)    if(pic_deblocking_filter_override_flag ) {    pic_deblocking_filter_disabled_flag u(1)     if(!pic_deblocking_filter_disabled_flag ) {      pic_beta_offset_div2 se(v)     pic_tc_offset_div2 se(v)     }    }   }  }  if(sps_lmcs_enabled_flag ) {   pic_lmcs_enabled_flag u(1)   if(pic_lmcs_enabled_flag ) {    pic_lmcs_aps_id u(2)    if( ChromaArrayType!= 0 )     pic_chroma_residual_scale_flag u(1)   }  }  if(sps_scaling_list_enabled_flag ) {   pic_scaling_list_present_flag u(1)  if( pic_scaling_list_present_flag )    pic_scaling_list_aps_id u(3)  } if( picture_header_extension_present_flag ) {   ph_extension_lengthue(v)   for( i = 0; i < ph_extension_length; i++)   ph_extension_data_byte[ i ] u(8)  }  rbsp_trailing_bits( ) }

Meanwhile, adoption of a PH may mean that there must be at least two NALunits for every coded picture. For example, one of the two units may bea NAL unit for the PH, and the other may be a NAL unit for a coded sliceincluding a slice header (SH) and slice data. This may be a problem fora bitstream having a low bit rate because an additional NAL unit perpicture may considerably affect the bit rate. Therefore, it may bedesirable for the PH to have a mode in which it does not consume new NALunits.

Accordingly, the present disclosure proposes embodiments for solving theabove-described problems. The proposed embodiments may be appliedindividually or in combination.

As an example, a method of signaling a flag in a high level parameterset indicating presence or absence of a PH NAL unit in a coded layervideo sequence (CLVS) is proposed. That is, the flag may indicatewhether a picture header is present in a NAL unit (i.e., a PH NAL unit)or a slice header. Here, for example, the CLVS may mean a sequence ofpicture units (PUs) having the same value of nuh_layer_id. The pictureunit may be a set of NAL unit(s) for a coded picture. Further, forexample, the high level parameter set may be a sequence parameter set(SPS), a picture parameter set (PPS), or a slice header. The flag may becalled ph_nal_present_flag. Alternatively, the flag may be referred toas a PH NAL presence flag.

In addition, with respect to the PH NAL presence flag, the presentdisclosure proposes an embodiment in which the value ofph_nal_present_flag is constrained to be the same for all SPSs referredto by pictures of the same CVS. The constraint may mean that the valueof ph_nal_present_flag must be the same for one coded video sequence ina multi-layer bitstream.

Further, as an example, when the value of ph_nal_present_flag is equalto 1, one PH NAL unit is present, and this PH NAL unit is associatedwith video coding layer (VCL) NAL units of a picture.

Further, as an example, when the value of ph_nal_present_flag is equalto 0 (i.e., when a PH NAL unit is not present for each picture), amethod in which the following constraints are applied is proposed.

For example, the aforementioned constraints may be as follows.

First, all pictures of CLVS may include only one slice.

Second, a PH NAL unit may not be present. A PH syntax table may bepresent in a slice layer RBSP along with a slice header (SH) and slicedata. That is, the PH syntax table may be present in the slice header.

Third, the PH syntax table and the SH syntax table may start at abyte-aligned position. To implement this, a byte alignment bit may beadded between the PH and the SH.

Fourth, the value of picture_header_extension_present_flag in all PPSsreferring to a SPS may be 0.

Fifth, all syntax elements that may be present in the PH or the SH maybe present in the PH instead of the SH.

Further, as an example, a method of updating access unit detection maybe proposed. That is, instead of checking the PH, every new VCL NAL unitmay mean a new access unit (AU). That is, when the value ofph_nal_present_flag indicates that the PH NAL unit is not present, theVCL NAL unit including ph_nal_present_flag is not a VCL NAL unit for aprevious AU (i.e., a picture for the previous AU) and may mean that aVCL NAL unit for a new AU (i.e., a picture for a new AU) is parsed.Accordingly, when the value of ph_nal_present_flag indicates that the PHNAL unit is not present, the VCL NAL unit including ph_nal_present_flagmay be the first VCL NAL unit for the picture of the new AU (e.g., acurrent picture to be decoded). Here, AU may mean a set of picture units(PUs) belonging to different layers and including coded pictures relatedto the same time for output of a decoded picture buffer (DPB). Inaddition, the PU may mean a set of NAL units including one codedpicture, which are associated and have a continuous decoding order. Thatis, the PU may mean a set of NAL units for one coded picture, which areassociated and have a continuous decoding order. Meanwhile, when abitstream is a single layer bitstream rather than a multilayerbitstream, the AU may be the same as the PU.

The embodiments proposed in the present disclosure may be implemented asdescribed below.

For example, an SPS syntax in which ph_nal_present_flag proposed in theembodiment of the present disclosure is signaled may be as follows.

TABLE 3 Descriptor seq_parameter_set_rbsp( ) {  ...  ph_nal_present_flagu(1)  ... }

Referring to Table 3, the SPS may include ph_nal_present_flag.

For example, the semantic of the syntax element ph_nal_present_flag maybe as shown in the following table.

TABLE 4 ... ph_nal_present_flag equal to 1 specifies that NAL unit withnal_unit_type equal to PH_NUT is present for each coded picture in theCLVSs referring to the SPS. ph_nal_present_flag equal to 0 specifiesthat NAL unit with nal_unit_type equal to PH_NUH is not present for eachcoded picture in the CLVSs referring to the SPS. Whenph_nal_present_flag is equal to 1, the following applies: - NAL unitwith nal_unit_type PH_NUT shall not be present in the CLVSs referring tothe SPS. - Each picture in the CLVSs referring to the SPS shall containexactly one slice. - PH is present in slice layer RBSP. ...

For example, referring to Table 4, the syntax elementph_nal_present_flag may indicate whether a NAL unit having the samenal_unit_type as PH_NUT is present for each coded picture of CLVSsreferring to the SPS. For example, ph_nal_present_flag equal to 1 mayindicate that a NAL unit having the same nal_unit_type as PH_NUT ispresent for each coded picture of CLVSs referring to the SPS. Further,for example, ph_nal_present_flag equal to 0 may indicate that a NAL unithaving the same nal_unit_type as PH_NUH is not present for each codedpicture of CLVSs referring to the SPS.

Further, for example, when the ph_nal_present_flag is 1, the followingmay be applied.

-   -   A NAL unit having nal_unit_type of PH_NUT (i.e., a PH NAL unit)        may not be present in CLVSs referring to the SPS.    -   Each picture of CLVSs referring to the SPS may include one        slice.    -   PH may be present in a slice layer RBSP.

Meanwhile, although a method in which ph_nal_present_flag is signaledthrough the SPS is proposed in Table 3 and Table 4, the method shown inTable 3 and Table 4 is an embodiment proposed in the present disclosure,and an embodiment in which ph_nal_present_flag is signaled through a PPSor a slice header instead of the SPS may also be proposed.

Meanwhile, for example, according to an embodiment proposed in thepresent disclosure, the picture header syntax table and the pictureheader RBSP may be separately signaled as shown in the following table.

TABLE 5 Descriptor picture_header_rbsp( ) {  picture_header( ) rbsp_trailing_bits( ) }

Further, the signaled picture header syntax table may be as follows.

TABLE 6 Descriptor picture_header_rbsp( ) {  non_reference_picture_flagu(1)  gdr_pic_flag u(1)  no_output_of_prior_pics_flag u(1)  if(gdr_pic_flag )   recovery_poc_ent ue(v)  ph_pic_parameter_set_id ue(v) if( sps_poc_msb_flag ) {   ph_poc_msb_present_flag u(1)   if(ph_poc_msb_present_flag )    poc_msb_val u(v)  }  if(sps_subpic_id_present_flag && !sps_subpic_id_signalling_flag ) {  ph_subpic_id_signalling_present_flag u(1)   if(ph_subpics_id_signalling_present_flag ) {    ph_subpic_id_len_minus1ue(v)    for( i = 0; i <= sps_num_subpics_minus1; i++ )    ph_subpic_id[ i ] u(v)   }  }  if(sps_virtual_boundaries_present_flag ) {  ph_virtual_boundaries_present_flag u(1)   if(ph_virtual_boundaries_present_flag ) {    ph_num_ver_virtual_boundariesu(2)    for( i = 0; i < ph_num_ver_virtual_boundaries; i++ )    ph_virtual_boundaries_pos_x[ i ] u(13)   ph_num_hor_virtual_boundaries u(2)    for( i = 0; i <ph_num_hor_virtual_boundaries; i++ )     ph_virtual_boundaries_pos_y[ i] u(13)   }  }  if( separate_colour_plane_flag = = 1 )   colour_plane_idu(2)  if( output_flag_present_flag )   pic_output_flag u(1) pic_rpl_present_flag u(1)  if( pic_rpl_present_flag ) {   for( i = 0; i< 2; i++ ) {    if( num_ref_pic_lists_in_sps[ i ] > 0 &&!pps_ref_pic_list_sps_idc[ i ] & &       ( i = = 0 | | ( i = = 1 &&rpl1_idx_present_flag ) ) )     pic_rpl_sps_flag[ i ] u(1)    if(pic_rpl_sps_flag[ i ] ) {     if( num_ref_pic_lists_in_sps[ i ] > 1 &&       ( i = = 0 | | ( i = = 1 && rpl1_idx_present_flag ) ) )     pic_rpl_idx[ i ] u(v)    } else     ref_pic_list_struct( i,num_ref_pic_lists_in_sps[ i ] )    for( j = 0; j < NumLtrpEntries[ i ][RplsIdx[ i ] ]; j++ ) {     if( ltrp_in_slice_header_flag[ i ][ RplsIdx[i ] ] )      pic_poc_lsb_lt[ i ][ j ] u(v)    pic_delta_poc_msb_present_flag[ i ][ j ] u(1)     if(pic_delta_poc_msb_present_flag[ i ][ j ] )     pic_delta_poc_msb_cycle_lt[ i ][ j ] ue(v)    }   }  }  if(partition_constraints_override_enabled_flag ) {  partition_constraints_override_flag ue(v)   if(partition_constraints_override_flag ) {   pic_log2_diff_min_qt_min_cb_intra_slice_luma ue(v)   pic_log2_diff_min_qt_min_cb_inter_slice ue(v)   pic_max_mtt_hierarchy_depth_inter_slice ue(v)   pic_max_mtt_hierarchy_depth_intra_slice_luma ue(v)    if(pic_max_mtt_hierarchy_depth_intra_slice_luma != 0 ) {    pic_log2_diff_max_bt_min_qt_intra_slice_luma ue(v)    pic_log2_diff_max_tt_min_qt_intra_slice_luma ue(v)    }    if(pic_max_mtt_hierarchy_depth_inter_slice != 0 ) {    pic_log2_diff_max_bt_min_qt_inter_slice ue(v)    pic_log2_diff_max_tt_min_qt_inter_slice ue(v)    }    if(qtbtt_dual_tree_intra_flag ) {    pic_log2_diff_min_qt_min_cb_intra_slice_chroma ue(v)    pic_max_mtt_hierarchy_depth_intra_slice_chroma ue(v)     if(pic_max_mtt_hierarchy_depth_intra_slice_chroma != 0 ) {     pic_log2_diff_max_bt_min_qt_intra_slice_chroma ue(v)     pic_log2_diff_max_tt_min_qt_intra_slice_chroma ue(v)     }    }   } }  if( cu_qp_delta_enabled_flag ) {  pic_cu_qp_delta_subdiv_intra_slice ue(v)  pic_cu_qp_delta_subdiv_inter_slice ue(v)  }  if(pps_cu_chroma_qp_offset_list_enabled_flag ) {  pic_cu_chroma_qp_offset_subdiv_intra_slice ue(v)  pic_cu_chroma_qp_offset_subdiv_inter_slice ue(v)  }  if(sps_temporal_mvp_enabled_flag )   pic_temporal_mvp_enabled_flag u(1) if(!pps_mvd_l1_zero_idc )   mvd_l1_zero_flag u(1)  if(!pps_six_minus_max_num_merge_cand_plus1 )  pic_six_minus_max_num_merge_cand ue(v)  if( sps_affine_enabled_flag )  pic_five_minus_max_num_subblock_merge_cand ue(v)  if(sps_fpel_mmvd_enabled_flag )   pic_fpel_mmvd_enabled_flag u(1)  if(sps_bdof_pic_present_flag )   pic_disable_bdof_flag u(1)  if(sps_dmvr_pic_present_flag )   pic_disable_dmvr_flag u(1)  if(sps_prof_pic_present_flag )   pic_disable_prof_flag u(1)  if(sps_triangle_enabled_flag && MaxNumMergeCand >= 2 &&   !pps_max_num_merge_cand_minus_max_num_triangle cand_plus1 )  pic_max_num_merge_cand_minus_max_num_triangle_cand ue(v)  if (sps_ibc_enabled_flag )   pic_six_minus_max_num_ibc_merge_cand ue(v)  if(sps_joint_cbcr_enabled_flag )   pic_joint_cbcr_sign_flag u(1)  if(sps_sao_enabled_flag ) {   pic_sao_enabled_present_flag u(1)   if(pic_sao_enabled_present_flag ) {    pic_sao_luma_enabled_flag u(1)   if(ChromaArrayType != 0 )     pic_sao_chroma_enabled_flag u(1)   }  } if( sps_alf_enabled_flag ) {   pic_alf_enabled_present_flag u(1)   if(pic_alf_enabled_present_flag ) {    pic_alf_enabled_flag u(1)    if(pic_alf_enabled_flag ) {     pic_num_alf_aps_ids_luma u(3)     for( i =0; i < pic_num_alf_aps_ids_luma, i++ )      pic_alf_aps_id_luma[ i ]u(3)     if( ChromaArrayType != 0 )      pic_alf_chroma_idc u(2)     if(pic_alf_chroma_idc )      pic_alf_aps_id_chroma u(3)    }   }  }  if (pps_dep_quant_enabled_idc = = 0 )   pic_dep_quant_enabled_flag u(1)  if(!pic_dep_quant_enabled_flag )   sign_data_hiding_enabled_flag u(1)  if(deblocking_filter_override_enabled_flag ) {  pic_deblocking_filter_override_present_flag u(1)   if(pic_deblocking_filter_override_present_flag ) {   pic_deblocking_filter_override_flag u(1)    if(pic_dcblocking_filter_override_flag ) {    pic_deblocking_filter_disabled_flag u(1)     if(!pic_deblocking_filter_disabled_flag ) {      pic_beta_offset_div2 se(v)     pic_tc_offset_div2 se(v)     }    }   }  }  if(sps_lmcs_enabled_flag ) {   pic_lmcs_enabled_flag u(1)   if(pic_lmcs_enabled_flag ) {    pic_lmcs_aps_id u(2)    if( ChromaArrayType!= 0 )     pic_chroma_residual_scale_flag u(1)   }  }  if(sps_scaling_list_enabled_flag ) {   pic_scaling_list_present_flag u(1)  if( pic_scaling_list_present_flag )    pic_scaling_list_aps_id u(3)  } if( picture_header_extension_present_flag ) {   ph_extension_lengthue(v)   for( i = 0; i < ph_extension_length; i++)   ph_extension_data_byte[ i ] u(8)  }  rbsp_trailing_bits( ) }

Further, according to an embodiment proposed in the present disclosure,for example, the slice layer RBSP may be signaled as follows.

TABLE 7 Descriptor slice_layer_rbsp( ) {  if( !ph_nal_present_flag ) {  picture_header( )   byte_alignment( )  }   slice_header( )  slice_data( )   rbsp_slice_trailing_bits( ) }

Further, for example, according to an embodiment proposed in the presentdisclosure, one or more of the constraints shown in the following tablemay be applied.

TABLE 8 The following one or more constraints may be applied: Whenph_nal_present_flag is equal to 0, the value ofpicture_header_extension_present_flag shall be equal to 0. It is arequirement of bitstream conformance that the value ofpic_rpl_present_flag shall be equal to 1 when both conditions below aretrue: - ph_nal_present_flag is equal to 0 and the picture associatedwith the PH is not an IDR picture. - ph_nal_present_flag is equal to 0,the picture associated with the PH is an IDR picture, andsps_id_rpl_present_flag is equal to 1. * rpl: reference picture list Itis a requirement of bitstream conformance that the value ofpic_sao_enabled_present_flag shall be equal to 1 when the value ofph_nal_present_flag is equal to 0. It is a requirement of bitstreamconformance that the value of pic_alf_enabled_present_flag shall beequal to 1 when the value of ph_nal_present_flag is equal to 0. It is arequirement of bitstream conformance that the value ofpic_deblocking_filter_override_present_flag shall be equal to 1 when thevalue of ph_nal_present_flag is equal to 0.

For example, referring to Table 8, if ph_nal_present_flag is 0, thevalue of picture header extension present flag may be 0.

In addition, for example, when both the following conditions are true,it may be requirement for bitstream suitability that the value ofpic_rpl_present_flag must be equal to 1.

-   -   ph_nal_present_flag is 0, and a picture associated with a PH is        not an IDR picture.    -   ph_nal_present_flag is 0, a picture associated with a PH is an        IDR picture, and sps_id_rpl_present_flag is equal to 1.

Here, rpl may mean a reference picture list.

In addition, for example, when the value of ph_nal_present_flag is 0, itmay be requirement for bitstream suitability that the value ofpic_sao_enabled_present_flag must be equal to 1.

Further, for example, when the value of ph_nal_present_flag is 0, it maybe requirement for bitstream suitability that the value ofpic_alf_enabled_present_flag must be equal to 1.

Further, for example, when the value of ph_nal_present_flag is 0, it maybe requirement for bitstream suitability that the value ofpic_deblocking_filter_override_present_flag must be equal to 1.

Meanwhile, for example, embodiment(s) may be applied according to thefollowing procedure.

FIG. 11 schematically shows an encoding procedure according to anembodiment of the present disclosure.

Referring to FIG. 11 , an encoding apparatus may generate NAL unit(s)including information on a picture (S1100). The encoding apparatus maydetermine whether a NAL unit for a picture header is present (S1110) andmay decide whether a NAL unit for the picture header is present (S1120).

For example, when a NAL unit for the picture header is present, theencoding apparatus may generate a bitstream including a VCL NAL unitincluding a slice header and a PH NAL unit including the picture header(S1130).

Meanwhile, for example, when a NAL unit for the picture header is notpresent, the encoding apparatus may generate a bitstream including a VCLNAL unit including a slice header and a picture header (S1140). That is,the picture header syntax structure may be present in the slice header.

FIG. 12 schematically shows a decoding procedure according to anembodiment of the present disclosure.

Referring to FIG. 12 , a decoding apparatus may receive a bitstreamincluding NAL unit(s) (S1200). Thereafter, the decoding apparatus maydetermine whether a NAL unit for a picture header is present (S1210).

For example, when a NAL unit for the picture header is present, thedecoding apparatus may decode/reconstruct a picture/slice/block/samplebased on a slice header in a VCL NAL unit and the picture header in a PHNAL unit (S1220).

Meanwhile, for example, when a NAL unit for the picture header is notpresent, the decoding apparatus may decode/reconstruct apicture/slice/block/sample based on a slice header and a picture headerin a VCL NAL unit (S1230).

Here, the (coded) bitstream may include one or more NAL units fordecoding a picture. In addition, the NAL unit may be a VCL NAL unit or anon-VCL NAL unit. For example, the VCL NAL unit may include informationon a coded slice, and the VAL NAL unit may have a NAL unit type havingthe NAL unit type class “VCL” shown in Table 1 above.

Meanwhile, according to the embodiment proposed in the presentdisclosure, the bitstream may include a PH NAL unit (a NAL unit for apicture header) or the bitstream may not include a PH NAL unit for thecurrent picture. Information indicating whether a PH NAL unit is present(e.g., ph_nal_present_flag) may be signaled through an HLS (e.g., a VPS,a DPS, an SPS, a slice header, or the like).

FIG. 13 schematically shows a picture header configuration in a NAL unitaccording to presence or absence of a PH NAL unit. For example, (a) ofFIG. 13 shows a case in which a PH NAL unit for the current picture ispresent, and (b) of FIG. 13 shows a case in which a PH NAL unit for thecurrent picture is not present but a picture header is included in a VCLNAL unit.

For example, when the PH NAL unit is present, the picture header may beincluded in the PH NAL unit. On the other hand, when the PH NAL unit isnot present, the picture header may still be configured but may beincluded in another type of NAL unit. For example, the picture headermay be included in a VCL NAL unit. The VCL NAL unit may includeinformation on a coded slice. A VCL unit may include a slice header fora coded slice. For example, when a specific slice header includesinformation representing that a coded/associated slice is the firstslice in a picture or a subpicture, the picture header may be includedin a specific VAL NAL unit including the specific slice header. Or, forexample, when the PH NAL unit is not present, the picture header may beincluded in a non-VCL NAL unit such as a PPS NAL unit, an APS NAL unit,or the like.

FIG. 14 schematically shows an image encoding method by an encodingapparatus according to the present document. The method disclosed inFIG. 14 may be performed by the encoding apparatus illustrated in FIG. 2. Specifically, for example, S1400 to S1410 of FIG. 14 may be performedby the entropy encoder of the encoding apparatus. Further, although notshown, the process of decoding the current picture may be performed bythe predictor and the residual processor of the encoding apparatus.

The encoding apparatus generates a Picture Header (PH) for a currentpicture (S1400). For example, the encoding apparatus may decode thecurrent picture, and may generate and encode information for the currentpicture. For example, the encoding apparatus may generate a PictureHeader (PH) for the current picture. Here, for example, the PH mayinclude syntax elements representing parameters for the current picture.

Meanwhile, for example, the encoding apparatus may generate a VideoCoding Layer (VCL) Network Abstraction Layer (NAL) unit including aslice header and slice data for a slice in a current picture. Theencoding apparatus may generate the slice header and the slice data forthe slice in the current picture. The slice header and the slice datamay be included in the VCL NAL unit.

For example, the slice header may include syntax elements representingparameters for the slice. Further, for example, the slice data mayinclude prediction information and residual information for blocks inthe slice.

Meanwhile, for example, the encoding apparatus may generate and encodethe prediction information for the block in the slice of the currentpicture. In this case, various prediction methods disclosed in thepresent disclosure, such as inter-prediction or intra-prediction, may beapplied. For example, the encoding apparatus may determine whether toperform inter-prediction or intra-prediction on the block and maydetermine a specific inter-prediction mode or a specificintra-prediction mode based on RD cost. According to the determinedmode, the encoding apparatus may derive a prediction sample for theblock. The prediction information may include prediction modeinformation for the block.

Further, for example, the encoding apparatus may encode the residualinformation for the block of the current picture.

For example, the encoding apparatus may derive a residual sample bysubtracting the prediction sample from the original sample for theblock.

Then, for example, the encoding apparatus may quantize the residualsample to derive a quantized residual sample, may derive a transformcoefficient based on the quantized residual sample, and generate andencode the residual information based on the transform coefficient.Alternatively, for example, the encoding apparatus may quantize theresidual sample to derive a quantized residual sample, transform thequantized residual sample to derive a transform coefficient, andgenerate and encode the residual information based on the transformcoefficient.

Meanwhile, for example, the encoding apparatus may derive a predictionsample and a residual sample for the block in the slice of the currentpicture based on the prediction information and the residual informationand generate a reconstructed sample/reconstructed picture for thecurrent picture based on the prediction sample and the residual sample.

The encoding apparatus encodes image information including the PH(S1410). The encoding apparatus may encode image information includingthe PH. For example, the encoding apparatus may determine whether aPicture Header (PH) Network Abstraction Layer (NAL) unit is present, andmay derive a NAL unit including the PH based on a result of thedetermination, and may encode a flag for whether the NAL unit and the PHNAL unit are present.

Specifically, for example, the encoding apparatus may determine whetherthe PH NAL unit is present. For example, when the PH NAL unit ispresent, the PH may be included in the PH NAL unit, when the PH NAL unitis not present, the PH may be included in a Video Coding Layer (VCL) NALunit for a slice of the current picture.

For example, when the PH NAL unit is present, the encoding apparatus maygenerate and encode a PH NAL unit including the PH for the currentpicture and a Video Coding Layer (VCL) NAL unit including information ona slice of the current picture (e.g., slice header and slice data).Also, for example, when the PH NAL unit is not present, the encodingapparatus may generate and encode a Video Coding Layer (VCL) NAL unitincluding a PH for the current picture and information on one slice ofthe current picture (e.g., slice header and slice data). Further, forexample, when the PH NAL unit is not present, that is, when the flagrepresents that the PH NAL unit is not present, the current picture mayinclude only one slice.

Also, for example, the encoding apparatus may generate and encode a flagfor whether the PH NAL unit is present based on the determinationresult. For example, the flag may represent whether the PH NAL unit ispresent. For example, when the value of the flag is 1, the flag mayrepresent that the PH NAL unit is present, and when the value of theflag is 0, the flag may represent that the PH NAL unit is not present.Alternatively, for example, when the value of the flag is 0, the flagmay represent that the PH NAL unit is present, and when the value of theflag is 1, the flag may represent that the PH NAL unit is not present.The syntax element of the flag may be the above-describedph_nal_present_flag. Meanwhile, for example, the image information mayinclude a high-level syntax, and the flag may be included in thehigh-level syntax. That is, for example, the flag may be signaled in thehigh-level syntax. For example, the high-level syntax may be a sequenceparameter set (SPS). Or, for example, the high-level syntax may be aslice header (SH). That is, for example, the flag may be included in theslice header.

As described above, the image information may include the PH NAL unit,the VCL NAL unit, and/or the flag. For example, when the flag representsthat the PH NAL unit is present, that is, when the PH NAL unit ispresent, the PH may be included in the PH NAL unit, and when the flagrepresents that the PH NAL unit is not present, that is, the PH NAL unitins not present, the PH may be included in the slice header for theslice of the current picture. For example, when the flag represents thatthe PH NAL unit is present, that is, when the PH NAL unit is present,the PH may be included in the PH NAL unit, and when the flag representsthat the PH NAL unit is not present, that is, when the PH NAL unit isnot present, the PH may be included in a VCL NAL unit including a sliceheader and slice data for the slice. That is, for example, the PH may beincluded in the PH NAL unit when the flag represents that the PH NALunit is present, and the PH may be included in the slice header when theflag represents that the PH NAL unit is not present. For example, whenthe flag represents that the PH NAL unit is present, that is, when thePH NAL unit is present, the image information may include the PH NALunit including the PH and at least one VCL NAL unit including the sliceheader and slice data for the slice of the current picture, and when theflag represents that the PH NAL unit is not present, that is, when thePH NAL unit is not present, the image information may include a VCL NALunit including the PH, the slice header, and the slice data.

Further, for example, when the flag represents that the PH NAL unit isnot present, that is, when the PH NAL unit is not present, a PH NAL unitmay not be present for all pictures in a coded video layer sequence(CLVS) including the current picture. That is, for example, flagsrepresenting for whether a PH NAL unit is present for all pictures in acoded video layer sequence (CLVS) may have the same value. Further, forexample, when the flag represents that the PH NAL unit is not present,that is, when the PH NAL unit is not present, picture headers for allpictures in the CLVS may be included in VCL NAL units including sliceheaders of all the pictures.

Meanwhile, for example, AU detection may be modified from the existingmethod. For example, a new VCL NAL unit may mean a new AU. That is, forexample, when the flag represents that the PH NAL unit is not present,the VCL NAL unit including the slice header may be the first VCL NALunit of the current picture (for a new AU (i.e., AU for the currentpicture)). For example, the flag may be included in the slice header ofthe VCL NAL unit. Or, for example, when the flag represents that the PHNAL unit is present, it may be the first VCL NAL unit of the currentpicture which follows the PH NAL unit, that is, is signaled after the PHNAL unit.

Meanwhile, a bitstream including the image information may betransmitted to a decoding apparatus through a network or a (digital)storage medium. Here, the network may include a broadcasting networkand/or a communication network, and the digital storage medium mayinclude various storage media such as a USB, an SD, a CD, a DVD,Blu-ray, an HDD, and an SSD.

FIG. 15 schematically shows an encoding apparatus for performing animage encoding method according to this document. The method illustratedin FIG. 14 may be performed by the encoding apparatus illustrated inFIG. 15 . Specifically, for example, the entropy encoder of the encodingapparatus of FIG. 15 may perform S1100 to S1130. Although not shown, theprocess of decoding the current picture may be performed by thepredictor and the residual processor of the encoding apparatus.

FIG. 16 schematically shows an image decoding method by a decodingapparatus according to this document. The method illustrated in FIG. 16may be performed by the decoding apparatus illustrated in FIG. 3 .Specifically, for example, S1600 of FIG. 16 may be performed by theentropy decoder of the decoding apparatus, and S1610 of FIG. 16 may beperformed by the predictor and the residual processor of the decodingapparatus.

The decoding apparatus obtains image information from a bitstream(S1600). For example, the decoding apparatus may obtain a flag forwhether a Picture Header (PH) Network Abstraction Layer (NAL) unit for acurrent picture is present, and may obtain the PH for the currentpicture based on the flag.

Specifically, for example, the decoding apparatus may obtain a flag forwhether a Picture Header (PH) Network Abstraction Layer (NAL) unitincluding a PH for a current picture is present. For example, thedecoding apparatus may obtain the flag for whether a Picture Header (PH)Network Abstraction Layer (NAL) unit including a PH for a currentpicture is present through the bitstream. For example, the decodingapparatus may obtain the image information through the bitstream, andthe image information may include the flag. Also, for example, the imageinformation may include a high-level syntax, and the flag may beincluded in the high-level syntax. That is, for example, the flag may beobtained through the high-level syntax. For example, the high-levelsyntax may be a sequence parameter set (SPS). Or, for example, thehigh-level syntax may be a slice header (SH). That is, for example, theflag may be included in the slice header.

For example, the flag may represent whether the PH NAL unit is present.For example, when the value of the flag is 1, the flag may representthat the PH NAL unit is present, and when the value of the flag is 0,the flag may represent that the PH NAL unit is not present.Alternatively, for example, when the value of the flag is 0, the flagmay represent that the PH NAL unit is present, and when the value of theflag is 1, the flag may represent that the PH NAL unit is not present.The syntax element of the flag may be the above-describedph_nal_present_flag.

Also, for example, a NAL unit including the PH may be derived based onthe flag. For example, when the flag represents that the PH NAL unit ispresent, the PH may be included in the PH NAL unit, when the flagrepresents that the PH NAL unit is not present, the PH may be includedin a VCL MAL unit for a slice of the current picture. The VCL NAL unitmay include a slice header and the slice data for the slice. That is,for example, when the flag represents that the PH NAL unit is present,the PH may be included in the PH NAL unit, and when the flag representsthat the PH NAL unit is not present, the PH may be included in the sliceheader. For example, when the flag represents that the PH NAL unit ispresent, the PH may be obtained from the PH NAL unit, when the flagrepresents that the PH NAL unit is not present, the PH may be obtainedfrom the VCLNAL unit including the slice header and the slice data. Thatis, for example, when the flag represents that the PH NAL unit ispresent, the PH may be obtained from the PH NAL unit, when the flagrepresents that the PH NAL unit is not present, the PH may be obtainedfrom the slice header.

Meanwhile, for example, when the flag represents that the PH NAL unit ispresent, the image information may include the PH NAL unit including thePH and a VCL NAL unit including the slice header, and when the flagrepresents that the PH NAL unit is not present, the image informationmay include a VCL NAL unit including the PH, the slice header and theslice data. Also, for example, when the flag represents that the PH NALunit is not present, the image information may not include the PH NALunit.

Also, for example, the decoding apparatus may obtain a Video CodingLayer (VCL) NAL unit including a slice header and slice data for a sliceof the current picture. For example, the slice header and the slice datamay include syntax elements representing parameters for the slice.

Also, for example, the slice data may include prediction information andresidual information for a block in the slice. For example, theprediction information may include prediction mode information for theblock. Also, for example, the residual information is information forresidual samples of the block. The residual information may includeinformation for quantized transform coefficients for the residualsamples.

Also, for example, the decoding apparatus may obtain the PH for thecurrent picture based on the flag. The decoding apparatus may obtain thePH from the PH NAL unit or the VCL NAL unit including the slice headerand the slice data based on the flag. That is, for example, the decodingapparatus may obtain the PH from the PH NAL unit or the slice headerbased on the flag.

For example, the PH may be obtained from the PH NAL unit when the flagrepresents that the PH NAL unit is present, and the PH may be obtainedfrom the VCL NAL unit including the slice header and the slice data whenthe flag represents that the PH NAL unit is not present. That is, forexample, the PH may be obtained from the PH NAL unit when the flagrepresents that the PH NAL unit is present, and the PH may be obtainedfrom the slice header when the flag represents that the PH NAL unit isnot present. For example, the PH may be included in the PH NAL unit whenthe flag represents that the PH NAL unit is present, and the PH may beincluded in the VCL NAL unit including the slice header and the slicedata when the flag represents that the PH NAL unit is not present. Thatis, for example, the PH may be included in the PH NAL unit when the flagrepresents that the PH NAL unit is present, and the PH may be includedin the slice header when the flag represents that the PH NAL unit is notpresent. For example, the image information may include the PH NAL unitincluding the PH and the VCL NAL unit including the slice header whenthe flag represents that the PH NAL unit is present, and the imageinformation may include a VCL NAL unit including the PH, the sliceheader, and the slice data when the flag represents that the PH NAL unitis not present. Further, for example, when the flag represents that thePH NAL unit is not present, the image information may not include a PHNAL unit.

Further, for example, when the flag represents that the PH NAL unit isnot present, the current picture for the PH may include only one slice.That is, for example, when the flag represents that the PH NAL unit isnot present, the image information may include a VCL NAL unit includinga slice header and slice data for one slice in the current picture.

Further, for example, when the flag represents that the PH NAL unit ispresent, the PH NAL unit for the current picture and at least one VCLNAL unit including the slice header and slice data for the currentpicture may be obtained through the bitstream. That is, for example,when the flag represents that the PH NAL unit is present, the imageinformation may include a VCL NAL unit including a slice header andslice data for a slice other than the current slice in the currentpicture along with the PH NAL unit for the current picture and the VCLNAL unit for the current slice.

Further, for example, when the flag represents that the PH NAL unit isnot present, a PH NAL unit may not be present for all pictures in acoded video layer sequence (CLVS) including the current picture. Thatis, for example, flags representing whether a PH NAL unit is present forall pictures in the coded video layer sequence (CLVS) may have the samevalue. Further, for example, when the flag represents that the PH NALunit is not present, picture headers for all the pictures in the CLVSmay be included in slice headers of all the pictures. That is, forexample, when the flag represents that the PH NAL unit is not present,the picture headers for all the pictures in the CLVS may be included inVCL NAL units including slice headers of all the pictures.

Meanwhile, for example, AU detection may be modified from the existingmethod. For example, a new VCL NAL unit may mean a new AU. That is, forexample, when the flag represents that the PH NAL unit is not present,the VCL NAL unit including the slice header may be the first VCL NALunit of the current picture (for a new AU (i.e., AU for the currentpicture)). For example, the flag may be included in the slice header ofthe VCL NAL unit. Or, for example, when the flag represents that the PHNAL unit is present, it may be the first VCL NAL unit of the currentpicture which follows the PH NAL unit, that is, is signaled after the PHNAL unit.

The decoding apparatus decodes a current picture based on the imageinformation (S1610). The decoding apparatus may decode the currentpicture based on the image information.

For example, the decoding apparatus may decode the current picture basedon the PH, the slice header, and the slice data. For example, thedecoding apparatus may decode the current picture based on the syntaxelements of the PH, the syntax elements of the slice header, and theslice data. For example, the syntax elements of the PH may be the syntaxelements shown in Table 6. The PH may include syntax elementsrepresenting parameters for the current picture, and the slice headermay include syntax elements representing parameters for the slice. Also,for example, the slice data may include prediction information andresidual information for a block in the slice. For example, the decodingapparatus may derive a prediction sample and a residual sample for theblock in the slice of the current picture based on the predictioninformation and the residual information and generate a reconstructedsample/reconstructed picture for the current picture based on theprediction sample and the residual sample.

As described above, an in-loop filtering procedure such as deblockingfiltering, SAO and/or ALF procedure may be applied to the reconstructedsamples in order to improve subjective/objective picture quality asnecessary.

FIG. 17 schematically shows a decoding apparatus for performing an imagedecoding method according to this document. The method illustrated inFIG. 16 may be performed by the decoding apparatus illustrated in FIG.17 . Specifically, for example, the entropy decoder of the decodingapparatus of FIG. 17 may perform S1600 of FIG. 16 , and the predictorand the residual processor of the decoding apparatus of FIG. 17 mayperform S1610 of FIG. 16 .

According to the present disclosure described above, it is possible tosignal the flag representing presence or absence of a PH NAL unit, toadjust a NAL unit adaptively to the bit rate of a bitstream based on theflag, and to improve overall coding efficiency.

In addition, according to the present disclosure, it is possible to seta constraint on the number of slices in the current picture and aconstraint on presence or absence of a PH NAL unit for related picturesbased on the flag representing presence or absence of a PH NAL unit andto control a NAL unit adaptively to the bit rate, thereby improving theoverall coding efficiency.

In the above-described embodiment, the methods are described based onthe flowchart having a series of steps or blocks. The present disclosureis not limited to the order of the above steps or blocks. Some steps orblocks may occur simultaneously or in a different order from other stepsor blocks as described above. Further, those skilled in the art willunderstand that the steps shown in the above flowchart are notexclusive, that further steps may be included, or that one or more stepsin the flowchart may be deleted without affecting the scope of thepresent disclosure.

The embodiments described in this specification may be performed bybeing implemented on a processor, a microprocessor, a controller or achip. For example, the functional units shown in each drawing may beperformed by being implemented on a computer, a processor, amicroprocessor, a controller or a chip. In this case, information forimplementation (e.g., information on instructions) or algorithm may bestored in a digital storage medium.

In addition, the decoding apparatus and the encoding apparatus to whichthe present disclosure is applied may be included in a multimediabroadcasting transmission/reception apparatus, a mobile communicationterminal, a home cinema video apparatus, a digital cinema videoapparatus, a surveillance camera, a video chatting apparatus, areal-time communication apparatus such as video communication, a mobilestreaming apparatus, a storage medium, a camcorder, a VoD serviceproviding apparatus, an Over the top (OTT) video apparatus, an Internetstreaming service providing apparatus, a three-dimensional (3D) videoapparatus, a teleconference video apparatus, a transportation userequipment (e.g., vehicle user equipment, an airplane user equipment, aship user equipment, etc.) and a medical video apparatus and may be usedto process video signals and data signals. For example, the Over the top(OTT) video apparatus may include a game console, a blue-ray player, aninternet access TV, a home theater system, a smart phone, a tablet PC, aDigital Video Recorder (DVR), and the like.

Furthermore, the processing method to which the present disclosure isapplied may be produced in the form of a program that is to be executedby a computer and may be stored in a computer-readable recording medium.Multimedia data having a data structure according to the presentdisclosure may also be stored in computer-readable recording media. Thecomputer-readable recording media include all types of storage devicesin which data readable by a computer system is stored. Thecomputer-readable recording media may include a BD, a Universal SerialBus (USB), ROM, PROM, EPROM, EEPROM, RAM, CD-ROM, a magnetic tape, afloppy disk, and an optical data storage device, for example.Furthermore, the computer-readable recording media includes mediaimplemented in the form of carrier waves (e.g., transmission through theInternet). In addition, a bit stream generated by the encoding methodmay be stored in a computer-readable recording medium or may betransmitted over wired/wireless communication networks.

In addition, the embodiments of the present disclosure may beimplemented with a computer program product according to program codes,and the program codes may be performed in a computer by the embodimentsof the present disclosure. The program codes may be stored on a carrierwhich is readable by a computer.

FIG. 18 illustrates a structural diagram of a contents streaming systemto which the present disclosure is applied.

The content streaming system to which the embodiment(s) of the presentdisclosure is applied may largely include an encoding server, astreaming server, a web server, a media storage, a user device, and amultimedia input device.

The encoding server compresses content input from multimedia inputdevices such as a smartphone, a camera, a camcorder, etc. Into digitaldata to generate a bitstream and transmit the bitstream to the streamingserver. As another example, when the multimedia input devices such assmartphones, cameras, camcorders, etc. directly generate a bitstream,the encoding server may be omitted.

The bitstream may be generated by an encoding method or a bitstreamgenerating method to which the embodiment(s) of the present disclosureis applied, and the streaming server may temporarily store the bitstreamin the process of transmitting or receiving the bitstream.

The streaming server transmits the multimedia data to the user devicebased on a user's request through the web server, and the web serverserves as a medium for informing the user of a service. When the userrequests a desired service from the web server, the web server deliversit to a streaming server, and the streaming server transmits multimediadata to the user. In this case, the content streaming system may includea separate control server. In this case, the control server serves tocontrol a command/response between devices in the content streamingsystem.

The streaming server may receive content from a media storage and/or anencoding server. For example, when the content is received from theencoding server, the content may be received in real time. In this case,in order to provide a smooth streaming service, the streaming server maystore the bitstream for a predetermined time.

Examples of the user device may include a mobile phone, a smartphone, alaptop computer, a digital broadcasting terminal, a personal digitalassistant (PDA), a portable multimedia player (PMP), navigation, a slatePC, tablet PCs, ultrabooks, wearable devices (ex. Smartwatches, smartglasses, head mounted displays), digital TVs, desktops computer, digitalsignage, and the like. Each server in the content streaming system maybe operated as a distributed server, in which case data received fromeach server may be distributed.

The claims described in the present disclosure may be combined invarious ways. For example, the technical features of the method claimsof the present disclosure may be combined to be implemented as anapparatus, and the technical features of the apparatus claims of thepresent disclosure may be combined to be implemented as a method. Inaddition, the technical features of the method claim of the presentdisclosure and the technical features of the apparatus claim may becombined to be implemented as an apparatus, and the technical featuresof the method claim of the present disclosure and the technical featuresof the apparatus claim may be combined to be implemented as a method.

What is claimed is:
 1. An image decoding method performed by a decodingapparatus, the method comprising: obtaining image information from abitstream; and decoding a current picture based on the imageinformation, wherein the obtaining the image information includes:obtaining a flag for whether a Picture Header (PH) Network AbstractionLayer (NAL) unit for the current picture is present; and obtaining a PHfor the current picture based on the flag, wherein a NAL unit includingthe PH is derived based on the flag, and wherein based on the flagrepresenting that the PH NAL unit is not present, the current pictureincludes only one slice.
 2. The method of claim 1, wherein when the flagrepresents that the PH NAL unit is present, the PH is included in the PHNAL unit, and when the flag represents that the PH NAL unit is notpresent, the PH is included in a Video Coding Layer (VCL) NAL unit forthe slice in the current picture.
 3. The method of claim 2, wherein theVCL NAL unit for the slice include a slice header and slice data for theslice.
 4. The method of claim 2, wherein when the flag represents thatthe PH NAL unit is not present, PH NAL units are not present for allpictures in a Coded Video Layer Sequence (CLVS) including the currentpicture.
 5. The method of claim 4, wherein when the flag represents thatthe PH NAL unit is not present, picture headers for all the pictures inthe CLVS are included in VCL NAL units including slice headers of allthe pictures.
 6. The method of claim 1, wherein the flag is obtained ina slice header.
 7. An image encoding method performed by an encodingapparatus, the method comprising: generating a Picture Header (PH) for acurrent picture; and encoding image information including the PH,wherein the encoding the image information includes: determining whethera Picture Header (PH) Network Abstraction Layer (NAL) unit for thecurrent picture is present; deriving a NAL unit including the PH basedon a result of the determination; and encoding the NAL unit and a flagfor whether the PH NAL unit is present, wherein based on the flagrepresenting that the PH NAL unit is not present, the current pictureincludes only one slice.
 8. The method of claim 7, wherein when the PHNAL unit is present, the PH is included in the PH NAL unit, and when thePH NAL unit is not present, the PH is included in a Video Coding Layer(VCL) NAL unit for the slice in the current picture.
 9. The method ofclaim 8, wherein the VCL NAL unit for the slice include a slice headerand slice data for the slice.
 10. The method of claim 7, wherein whenthe PH NAL unit is not present, PH NAL units are not present for allpictures in a Coded Video Layer Sequence (CLVS) including the currentpicture.
 11. The method of claim 10, wherein when the PH NAL unit is notpresent, picture headers for all the pictures in the CLVS are includedin VCL NAL units including slice headers of all the pictures.
 12. Themethod of claim 7, wherein the flag is signaled in a slice header.
 13. Anon-transitory computer-readable storage medium storing a bitstreamgenerated by a method, the method comprising: generating a PictureHeader (PH) for a current picture; encoding image information includingthe PH; and generating the bitstream including the image information,wherein the encoding the image information includes: determining whethera Picture Header (PH) Network Abstraction Layer (NAL) unit for thecurrent picture is present; deriving a NAL unit including the PH basedon a result of the determination; and encoding the NAL unit and a flagfor whether the PH NAL unit is present, wherein based on the flagrepresenting that the PH NAL unit is not present, the current pictureincludes only one slice.
 14. The computer-readable storage medium ofclaim 13, wherein when the PH NAL unit is present, the PH is included inthe PH NAL unit, and when the PH NAL unit is not present, the PH isincluded in a Video Coding Layer (VCL) NAL unit for the slice in thecurrent picture.